1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-09-20 09:41:35 +02:00

Dont send sessions replace or presence update for unidentified users

This commit is contained in:
Madeline 2023-01-13 13:44:19 +11:00
parent 6122374e4d
commit 3bbf997295

View File

@ -18,6 +18,9 @@ export async function Close(this: WebSocket, code: number, reason: string) {
if (this.session_id) { if (this.session_id) {
await Session.delete({ session_id: this.session_id }); await Session.delete({ session_id: this.session_id });
}
if (this.user_id) {
const sessions = await Session.find({ const sessions = await Session.find({
where: { user_id: this.user_id }, where: { user_id: this.user_id },
select: PrivateSessionProjection, select: PrivateSessionProjection,