From a5a788916c2e4612229f23d796fda4d007011d20 Mon Sep 17 00:00:00 2001 From: Markus Keil Date: Tue, 28 May 2024 08:38:22 +0200 Subject: [PATCH] add lobby support --- adapter.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/adapter.ts b/adapter.ts index 7fed728..82bb123 100644 --- a/adapter.ts +++ b/adapter.ts @@ -233,18 +233,27 @@ async function tokenize(req: Request): Promise { let room = permissions.find(r => r.room === roomName); if(room) { + // Check for lobby settings + const lobby = room.useLobby + + + const userName = userInfo["email"] console.log(`Found config for room ${roomName}. Checking for user ${userName}`) tokenRoom = roomName; // check if the user is in the moderator list if(room.moderators.includes(userName)) { console.log(`${userName} is a moderator of ${roomName}`); - // we keep the defaults + // make use owner + userInfo["affiliation"] = "owner"; } else { console.log(`${userName} is not a moderator of ${roomName}`); // reduce permissions userInfo["affiliation"] = "member"; + if(lobby) { + userInfo["lobby_bypass"] = false; + } } } else { @@ -373,3 +382,4 @@ function main() { // ----------------------------------------------------------------------------- main(); +