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); }