summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-12-16 13:18:26 +0100
committerRory& <root@rory.gay>2025-12-16 13:18:26 +0100
commiteaf2417da8d41c1183b85d191e895f8632dda5e2 (patch)
treee9e1767b89d55de6a4015965533b1751a5c945bf
parentLower interval for cleaning up sessions (diff)
downloadserver-ts-eaf2417da8d41c1183b85d191e895f8632dda5e2.tar.xz
Fix session
-rw-r--r--src/util/entities/Session.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/entities/Session.ts b/src/util/entities/Session.ts

index 4ff9e10c..d1b31b1d 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,