This commit is contained in:
jusax23 2023-03-22 21:10:54 +01:00
parent bd83abba30
commit 9efffabe80
Signed by: jusax23
GPG key ID: 499E2AA870C1CD41
2 changed files with 2 additions and 4 deletions

View file

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

View file

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