From 3684c69b8a9f7a73120f73f6c42c794ef8d80f86 Mon Sep 17 00:00:00 2001 From: jusax23 Date: Tue, 21 Mar 2023 20:15:59 +0100 Subject: [PATCH] member tag bug fix --- src/api/acts/rooms.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/api/acts/rooms.ts b/src/api/acts/rooms.ts index cf36337..efbae48 100644 --- a/src/api/acts/rooms.ts +++ b/src/api/acts/rooms.ts @@ -166,8 +166,12 @@ export const joinRoom: Act = { roomMembers.name, roomMembers.server, roomMembers.admin - ).add(roomID, client.name, client.server.tag, 0) - .query(db); + ).add( + roomID, + client.name, + client.state == STATE.remote ? client.server.tag : "local", + 0 + ).query(db); if (queryx.affectedRows > 0) { aws("ok", ""); } else { @@ -218,8 +222,12 @@ export const joinPublicRoom: Act = { roomMembers.name, roomMembers.server, roomMembers.admin - ).add(roomID, client.name, client.server.tag, 0) - .query(db); + ).add( + roomID, + client.name, + client.state == STATE.remote ? client.server.tag : "local", + 0 + ).query(db); if (queryx.affectedRows > 0) { aws("ok", ""); } else {