diff --git a/src/api/acts/client.ts b/src/api/acts/client.ts index 9e82368..ac7ea2f 100644 --- a/src/api/acts/client.ts +++ b/src/api/acts/client.ts @@ -96,7 +96,6 @@ export const createRoom: Act = { right: PERMISSIONS.CAN_USE_API, data: { room: "name-100", - server: "string", // Unused/Ignored at the Moment title: "string-255", description: "string-255", visibility: "number", @@ -141,7 +140,6 @@ export const deleteRoom: Act = { right: PERMISSIONS.CAN_USE_API, data: { room: "string", - server: "string", // Unused/Ignored at the Moment }, func: async (client: Client, data: any, aws: (code: string, data: any) => void) => { let req = await remove(rooms) diff --git a/src/api/user.ts b/src/api/user.ts index bd7649d..5c1a81a 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -68,7 +68,7 @@ export class Client { .where(and( eq(rooms.name, name), eq(roomMembers.name, this.name), - eq(roomMembers.server, this.server.tag) + eq(roomMembers.server, this.state == STATE.client ? "local" : this.server.tag) )) .query(db); if (query.length == 0) return -1; @@ -81,7 +81,7 @@ export class Client { eq(rooms.name, name), eq(roomMembers.admin, true), eq(roomMembers.name, this.name), - eq(roomMembers.server, this.server.tag) + eq(roomMembers.server, this.state == STATE.client ? "local" : this.server.tag) )) .query(db); if (query.length == 0) return -1;