|
@@ -114,7 +114,7 @@ function get_participants(room)
|
114
|
114
|
end
|
115
|
115
|
|
116
|
116
|
function broadcast_breakout_rooms(room_jid)
|
117
|
|
- local main_room, main_room_jid = get_main_room(room_jid);
|
|
117
|
+ local main_room = get_main_room(room_jid);
|
118
|
118
|
|
119
|
119
|
if not main_room or main_room._data.is_broadcast_breakout_scheduled then
|
120
|
120
|
return;
|
|
@@ -125,6 +125,11 @@ function broadcast_breakout_rooms(room_jid)
|
125
|
125
|
main_room:save(true);
|
126
|
126
|
module:add_timer(BROADCAST_ROOMS_INTERVAL, function()
|
127
|
127
|
local main_room, main_room_jid = get_main_room(room_jid);
|
|
128
|
+
|
|
129
|
+ if not main_room then
|
|
130
|
+ return;
|
|
131
|
+ end
|
|
132
|
+
|
128
|
133
|
main_room._data.is_broadcast_breakout_scheduled = false;
|
129
|
134
|
main_room:save(true);
|
130
|
135
|
|
|
@@ -395,7 +400,7 @@ function on_occupant_left(event)
|
395
|
400
|
-- we need to look up again the room as till the timer is fired, the room maybe already destroyed/recreated
|
396
|
401
|
-- and we will have the old instance
|
397
|
402
|
local main_room, main_room_jid = get_main_room(room_jid);
|
398
|
|
- if main_room._data.is_close_all_scheduled then
|
|
403
|
+ if main_room and main_room._data.is_close_all_scheduled then
|
399
|
404
|
module:log('info', 'Closing conference %s as all left for good.', main_room_jid);
|
400
|
405
|
main_room:set_persistent(false);
|
401
|
406
|
main_room:destroy(nil, 'All occupants left.');
|