From e4db1b4743cc418ae785f44dfd0a95d835d98257 Mon Sep 17 00:00:00 2001 From: hshim432 Date: Mon, 3 Jul 2023 16:14:08 +0900 Subject: [PATCH 1/2] Fix jicofo_lock is null when restored from storage --- resources/prosody-plugins/mod_muc_meeting_id.lua | 6 +++--- twa/app/src/main/res/xml/shortcuts.xml | 15 --------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/resources/prosody-plugins/mod_muc_meeting_id.lua b/resources/prosody-plugins/mod_muc_meeting_id.lua index 3cffcb13964..4dddf1cfc7d 100644 --- a/resources/prosody-plugins/mod_muc_meeting_id.lua +++ b/resources/prosody-plugins/mod_muc_meeting_id.lua @@ -81,7 +81,7 @@ 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 @@ -89,7 +89,7 @@ module:hook('muc-occupant-pre-join', function (event) 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 @@ -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 diff --git a/twa/app/src/main/res/xml/shortcuts.xml b/twa/app/src/main/res/xml/shortcuts.xml index 7f3e9c19646..5effdb1d119 100644 --- a/twa/app/src/main/res/xml/shortcuts.xml +++ b/twa/app/src/main/res/xml/shortcuts.xml @@ -1,16 +1 @@ - From f61e9a222c41f20e0298c5cdad4311651705a31d Mon Sep 17 00:00:00 2001 From: hshim432 Date: Mon, 3 Jul 2023 16:46:16 +0900 Subject: [PATCH 2/2] revert --- twa/app/src/main/res/xml/shortcuts.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/twa/app/src/main/res/xml/shortcuts.xml b/twa/app/src/main/res/xml/shortcuts.xml index 5effdb1d119..7f3e9c19646 100644 --- a/twa/app/src/main/res/xml/shortcuts.xml +++ b/twa/app/src/main/res/xml/shortcuts.xml @@ -1 +1,16 @@ +