fix(persistent_lobby): properly destroy main room when empty
This commit is contained in:
parent
a9f5829e58
commit
7249406960
|
@ -84,12 +84,10 @@ local function has_persistent_lobby(room)
|
|||
end
|
||||
|
||||
|
||||
-- Helper method to trigger main room destroy if room is persistent (no auto-delete) and destroy not yet triggered
|
||||
-- Helper method to trigger main room destroy
|
||||
local function trigger_room_destroy(room)
|
||||
if room.get_persistent(room) and room._data.room_destroy_triggered == nil then
|
||||
room._data.room_destroy_triggered = true;
|
||||
main_muc_module:fire_event("muc-room-destroyed", { room = room; });
|
||||
end
|
||||
room:set_persistent(false);
|
||||
room:destroy(nil, 'main room and lobby now empty');
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue