From 55e75d56fd02940db7ff0bb7c3c86b65312cc0f4 Mon Sep 17 00:00:00 2001 From: damencho Date: Mon, 2 Oct 2023 10:43:24 -0500 Subject: [PATCH] fix: Fixes skipping the lobby for two times in a row for jibri. An issue where a livestreaming is started for a second time in a meeting with lobby turned on. --- resources/prosody-plugins/mod_muc_flip.lua | 2 +- resources/prosody-plugins/mod_muc_lobby_rooms.lua | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/prosody-plugins/mod_muc_flip.lua b/resources/prosody-plugins/mod_muc_flip.lua index f64a90c7d085..34ab2fa9780e 100644 --- a/resources/prosody-plugins/mod_muc_flip.lua +++ b/resources/prosody-plugins/mod_muc_flip.lua @@ -58,7 +58,7 @@ module:hook("muc-occupant-pre-join", function(event) -- allow participant from flip device to bypass Lobby local occupant_jid = stanza.attr.from; local affiliation = room:get_affiliation(occupant_jid); - if not affiliation or affiliation == 0 then + if not affiliation or affiliation == 'none' or affiliation == 'member' then module:log("debug", "Bypass lobby invitee %s", occupant_jid) occupant.role = "participant"; room:set_affiliation(true, jid_bare(occupant_jid), "member") diff --git a/resources/prosody-plugins/mod_muc_lobby_rooms.lua b/resources/prosody-plugins/mod_muc_lobby_rooms.lua index f043e8b61bb0..dc7e2dd3c905 100644 --- a/resources/prosody-plugins/mod_muc_lobby_rooms.lua +++ b/resources/prosody-plugins/mod_muc_lobby_rooms.lua @@ -392,7 +392,8 @@ process_host_module(main_muc_component_config, function(host_module, host) if whitelistJoin then local affiliation = room:get_affiliation(invitee); - if not affiliation or affiliation == 0 then + -- if it was already set to be whitelisted member + if not affiliation or affiliation == 'none' or affiliation == 'member' then occupant.role = 'participant'; room:set_affiliation(true, invitee_bare_jid, 'member'); room:save();