From 698aa8db3ea83fb567d8f7b6c2cf5d9c291869f8 Mon Sep 17 00:00:00 2001 From: damencho Date: Wed, 8 Oct 2025 14:33:11 -0500 Subject: [PATCH] fix(persistent_lobby): Fix main room lookup. The change about keeping jid was introduced in 5580301. --- resources/prosody-plugins/mod_persistent_lobby.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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;