From 8c0e56b33a23e77dbde91a1552ed97bc14057bb2 Mon Sep 17 00:00:00 2001 From: not-nullptr Date: Fri, 22 Mar 2024 15:12:34 +0000 Subject: [PATCH] oops quick bugfix --- src/routes/lobby/+server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/lobby/+server.ts b/src/routes/lobby/+server.ts index ca258a9..bb80a7d 100644 --- a/src/routes/lobby/+server.ts +++ b/src/routes/lobby/+server.ts @@ -68,7 +68,7 @@ export async function POST({ request, getClientAddress }) { console.log("Room added:", JSON.stringify(room, null, 2)); // push every room to the top which starts with `[SUYU OFFICIAL]` and was created with username "suyu" const suyuRoom = RoomManager.rooms.find((r) => r.roomInfo.name.startsWith("[SUYU OFFICIAL]")); - if (suyuRoom && user.username === "suyu") { + if (suyuRoom && suyuRoom.host.username === "suyu") { RoomManager.rooms.splice(RoomManager.rooms.indexOf(suyuRoom), 1); RoomManager.rooms.unshift(suyuRoom); }