mirror of
https://github.com/immich-app/immich.git
synced 2025-01-06 03:46:47 +01: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
1 changed files with 1 additions and 1 deletions
|
@ -149,7 +149,7 @@ export class ServerInfoService {
|
||||||
}
|
}
|
||||||
|
|
||||||
// check once per hour (max)
|
// 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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue