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 {