From eaf2417da8d41c1183b85d191e895f8632dda5e2 Mon Sep 17 00:00:00 2001 From: Rory& Date: Tue, 16 Dec 2025 13:18:26 +0100 Subject: [PATCH] Fix session --- src/util/entities/Session.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/entities/Session.ts b/src/util/entities/Session.ts index 4ff9e10c5..d1b31b1db 100644 --- a/src/util/entities/Session.ts +++ b/src/util/entities/Session.ts @@ -85,8 +85,8 @@ export class Session extends BaseClassWithoutId { id_hash: crypto.createHash("sha256").update(this.session_id).digest("hex"), approx_last_used_time: this.last_seen.toISOString(), client_info: { - os: this.client_info.os, - client: this.client_info.client, + os: this.client_info?.os, + client: this.client_info?.client, location: this.last_seen_location, }, }; @@ -101,7 +101,7 @@ export class Session extends BaseClassWithoutId { client_status: this.client_status, approx_last_used_time: this.last_seen.toISOString(), client_info: { - ...this.client_info, + ...this.client_info ?? {}, location: this.last_seen_location, }, last_seen: this.last_seen,