Skip to content

Commit

Permalink
fix: jicofo_lock is null when restored from storage (#13517)
Browse files Browse the repository at this point in the history
* Fix jicofo_lock is null when restored from storage

* revert

---------

Co-authored-by: hshim432 <[email protected]>
  • Loading branch information
2 people authored and hristoterezov committed Jul 18, 2023
1 parent 5af9a63 commit 9b907ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions resources/prosody-plugins/mod_muc_meeting_id.lua
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ module:hook('muc-occupant-pre-join', function (event)
local room, stanza = event.room, event.stanza;

-- we skip processing only if jicofo_lock is set to false
if room.jicofo_lock == false or is_healthcheck_room(stanza.attr.from) then
if room._data.jicofo_lock == false or is_healthcheck_room(stanza.attr.from) then
return;
end

local occupant = event.occupant;
if ends_with(occupant.nick, '/focus') then
module:fire_event('jicofo-unlock-room', { room = room; });
else
room.jicofo_lock = true;
room._data.jicofo_lock = true;
if not room.pre_join_queue then
room.pre_join_queue = queue.new(QUEUE_MAX_SIZE);
end
Expand All @@ -108,7 +108,7 @@ end, 8); -- just after the rate limit
function handle_jicofo_unlock(event)
local room = event.room;

room.jicofo_lock = false;
room._data.jicofo_lock = false;
if not room.pre_join_queue then
return;
end
Expand Down

0 comments on commit 9b907ed

Please sign in to comment.