Skip to content

Commit

Permalink
fix: Fixes skipping the lobby for two times in a row for jibri.
Browse files Browse the repository at this point in the history
An issue where a livestreaming is started for a second time in a meeting with lobby turned on.
  • Loading branch information
damencho committed Oct 2, 2023
1 parent 32ac299 commit 55e75d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resources/prosody-plugins/mod_muc_flip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
3 changes: 2 additions & 1 deletion resources/prosody-plugins/mod_muc_lobby_rooms.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 55e75d5

Please sign in to comment.