Skip to content

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

feat(visitors): Fix creating breakout rooms for promoted visitor. (#13188)

Дамян Минковe772831f7c55
diff --git a/resources/prosody-plugins/mod_visitors.lua b/resources/prosody-plugins/mod_visitors.lua
index 48e347d46d..9d5449c870 100644
--- a/resources/prosody-plugins/mod_visitors.lua
+++ b/resources/prosody-plugins/mod_visitors.lua
@@ -20,17 +20,6 @@ end
local MUC_NS = 'http://jabber.org/protocol/muc';
--- get/infer focus component hostname so we can intercept IQ bound for it
-local focus_component_host = module:get_option_string('focus_component');
-if not focus_component_host then
- local muc_domain_base = module:get_option_string('muc_mapper_domain_base');
- if not muc_domain_base then
- module:log('error', 'Could not infer focus domain. Disabling %s', module:get_name());
- return;
- end
- focus_component_host = 'focus.'..muc_domain_base;
-end
-
-- required parameter for custom muc component prefix, defaults to 'conference'
local muc_domain_prefix = module:get_option_string('muc_mapper_domain_prefix', 'conference');
diff --git a/resources/prosody-plugins/util.lib.lua b/resources/prosody-plugins/util.lib.lua
index d3c5292e6b..3fdf6646c1 100644
--- a/resources/prosody-plugins/util.lib.lua
+++ b/resources/prosody-plugins/util.lib.lua
@@ -375,20 +375,7 @@ end
-- Retrieves the focus from the room and cache it in the room object
-- @param room The room name for which to find the occupant
local function get_focus_occupant(room)
- local focus_occupant = room._data.focus_occupant;
-
- if focus_occupant then
- return focus_occupant;
- end
-
- for _, n_occupant in room:each_occupant() do
- if jid.node(n_occupant.jid) == 'focus' then
- room._data.focus_occupant = n_occupant;
- return n_occupant;
- end
- end
-
- return nil;
+ return room:get_occupant_by_nick(room.jid..'/focus');
end
return {