Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix jicofo_lock is null when restored from storage #13517

Merged
merged 2 commits into from
Jul 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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