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:
Robert Vollmer 2024-03-04 15:42:22 +01:00 committed by GitHub
parent 7ef202c8b2
commit de71d8e0a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
}