mirror of
https://github.com/immich-app/immich.git
synced 2024-12-25 10:43:13 +02:00
fix(server): regular version check (#7620)
`dt.diffNow()` equals `dt.diff(DateTime.now())`, so it returns a negative number when `dt` is in the past (which it always is in this case). Therefore we could only get over the condition during startup (when `this.releaseVersionCheckedAt` isn't set yet), effectively breaking update notifications while the server is running.
This commit is contained in:
parent
7ef202c8b2
commit
de71d8e0a3
@ -149,7 +149,7 @@ export class ServerInfoService {
|
||||
}
|
||||
|
||||
// check once per hour (max)
|
||||
if (this.releaseVersionCheckedAt && this.releaseVersionCheckedAt.diffNow().as('minutes') < 60) {
|
||||
if (this.releaseVersionCheckedAt && DateTime.now().diff(this.releaseVersionCheckedAt).as('minutes') < 60) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user