From 4ec4c45a90b60022e48f54482d31bed61170dd5a Mon Sep 17 00:00:00 2001 From: damencho Date: Wed, 5 Apr 2017 13:41:21 -0500 Subject: [PATCH] Adds a second parameter named domain to muc_size module. Adds and the default conference. part where the muc module live in default deployments. --- resources/prosody-plugins/mod_muc_size.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/resources/prosody-plugins/mod_muc_size.lua b/resources/prosody-plugins/mod_muc_size.lua index 7a6265821..6ca867dc3 100644 --- a/resources/prosody-plugins/mod_muc_size.lua +++ b/resources/prosody-plugins/mod_muc_size.lua @@ -40,10 +40,12 @@ end function handle_get_room_size(event) local params = parse(event.request.url.query); local room_name = params["room"]; - local room = get_room_from_jid(room_name); + local domain_name = params["domain"]; + local room_address = room_name .. "@" .. "conference." .. domain_name; + local room = get_room_from_jid(room_address); local participant_count = 0; - log("debug", "Querying room %s", tostring(room_name)); + log("debug", "Querying room %s", tostring(room_address)); if room then local occupants = room._occupants; @@ -71,11 +73,13 @@ end function handle_get_room (event) local params = parse(event.request.url.query); local room_name = params["room"]; - local room = get_room_from_jid(room_name); + local domain_name = params["domain"]; + local room_address = room_name .. "@" .. "conference." .. domain_name; + local room = get_room_from_jid(room_address); local participant_count = 0; local occupants_json = array(); - log("debug", "Querying room %s", tostring(room_name)); + log("debug", "Querying room %s", tostring(room_address)); if room then local occupants = room._occupants;