From 09c085477907527cb19c1651312ed1701d9092dd Mon Sep 17 00:00:00 2001 From: Esra Hatice YILMAZ Date: Thu, 5 Oct 2023 23:56:53 +0300 Subject: [PATCH] fix(breakout-rooms) fix race condition in timer handling --- resources/prosody-plugins/mod_muc_breakout_rooms.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/prosody-plugins/mod_muc_breakout_rooms.lua b/resources/prosody-plugins/mod_muc_breakout_rooms.lua index 7723b4b9dc48..a407b3b94d16 100644 --- a/resources/prosody-plugins/mod_muc_breakout_rooms.lua +++ b/resources/prosody-plugins/mod_muc_breakout_rooms.lua @@ -362,11 +362,11 @@ function on_occupant_joined(event) return; end - local main_room = get_main_room(room.jid); + local main_room, main_room_jid = get_main_room(room.jid); if main_room and main_room._data.breakout_rooms_active then if jid_node(event.occupant.jid) ~= 'focus' then - broadcast_breakout_rooms(room.jid); + broadcast_breakout_rooms(main_room_jid); end -- Prevent closing all rooms if a participant has joined (see on_occupant_left). @@ -411,14 +411,14 @@ function on_occupant_left(event) return; end - local main_room = get_main_room(room_jid); + local main_room, main_room_jid = get_main_room(room_jid); if not main_room then return; end if main_room._data.breakout_rooms_active and jid_node(event.occupant.jid) ~= 'focus' then - broadcast_breakout_rooms(room_jid); + broadcast_breakout_rooms(main_room_jid); end -- Close the conference if all left for good.