Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(persistent_lobby): Fix main room lookup.

damencho698aa8db3ea8
diff --git a/resources/prosody-plugins/mod_persistent_lobby.lua b/resources/prosody-plugins/mod_persistent_lobby.lua
index 2f4e30c399..d43cd119a0 100644
--- a/resources/prosody-plugins/mod_persistent_lobby.lua
+++ b/resources/prosody-plugins/mod_persistent_lobby.lua
@@ -11,6 +11,7 @@
module:depends('room_destroy');
local util = module:require "util";
+local get_room_from_jid = util.get_room_from_jid;
local is_healthcheck_room = util.is_healthcheck_room;
local main_muc_component_host = module:get_option_string('main_muc');
local lobby_muc_component_host = module:get_option_string('lobby_muc');
@@ -144,9 +145,13 @@ run_when_component_loaded(lobby_muc_component_host, function(host_module, host_n
lobby_module:hook("muc-occupant-left", function(event)
-- Check if room should be destroyed when someone leaves the lobby
-
local lobby_room = event.room;
- local main_room = lobby_room.main_room;
+
+ if not lobby_room.main_room_jid then
+ return;
+ end
+
+ local main_room = get_room_from_jid(lobby_room.main_room_jid);
if not main_room or is_healthcheck_room(main_room.jid) or not has_persistent_lobby(main_room) then
return;