diff --git a/resources/prosody-plugins/mod_visitors_component.lua b/resources/prosody-plugins/mod_visitors_component.lua index a1303d18daea..293198917827 100644 --- a/resources/prosody-plugins/mod_visitors_component.lua +++ b/resources/prosody-plugins/mod_visitors_component.lua @@ -95,11 +95,13 @@ local function request_promotion_received(room, from_jid, from_vnode, nick, time local iq_id = new_id(); sent_iq_cache:set(iq_id, socket.gettime()); + local node = jid.node(room.jid); + module:send(st.iq({ type='set', to = req_from, from = module.host, id = iq_id }) :tag('visitors', { xmlns='jitsi:visitors', - room = string.gsub(room.jid, muc_domain_base, req_from), + room = jid.join(node, muc_domain_prefix..'.'..req_from), focusjid = focus_jid }) :tag('promotion-response', { xmlns='jitsi:visitors', @@ -282,11 +284,13 @@ local function process_promotion_response(room, id, approved) local iq_id = new_id(); sent_iq_cache:set(iq_id, socket.gettime()); + local node = jid.node(room.jid); + module:send(st.iq({ type='set', to = req_from, from = module.host, id = iq_id }) :tag('visitors', { xmlns='jitsi:visitors', - room = string.gsub(room.jid, muc_domain_base, req_from), + room = jid.join(node, muc_domain_prefix..'.'..req_from), focusjid = focus_jid }) :tag('promotion-response', { xmlns='jitsi:visitors',