Fix session

This commit is contained in:
Rory&
2025-12-16 13:18:26 +01:00
parent 0e0a205d88
commit eaf2417da8

View File

@@ -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,