From de71d8e0a3b9f3617b3bad87cf7a65df326d5bf7 Mon Sep 17 00:00:00 2001 From: Robert Vollmer Date: Mon, 4 Mar 2024 15:42:22 +0100 Subject: [PATCH] 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. --- server/src/domain/server-info/server-info.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/domain/server-info/server-info.service.ts b/server/src/domain/server-info/server-info.service.ts index 51d26b2c3d..8222357309 100644 --- a/server/src/domain/server-info/server-info.service.ts +++ b/server/src/domain/server-info/server-info.service.ts @@ -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; }