fix: Clear prosody utils and removes a debug statement.

This commit is contained in:
damencho 2021-06-21 23:49:06 +03:00 committed by Дамян Минков
parent e6cdeb31ff
commit 53cea31bb8
2 changed files with 3 additions and 13 deletions

View File

@ -3,8 +3,6 @@
-- It is recommended to set muc_mapper_domain_base to the main domain being served (example.com)
local jid = require "util.jid";
local filters = require "util.filters";
local muc_domain_base = module:get_option_string("muc_mapper_domain_base");

View File

@ -63,9 +63,8 @@ local function room_jid_match_rewrite(room_jid, stanza)
roomless_iqs[stanza.attr.id] = stanza.attr.to;
end
end
room_jid = jid.join(new_node, new_host, new_resource);
-- module:log("debug", "Rewrote to %s", room_jid);
return room_jid
return jid.join(new_node, new_host, new_resource);
end
-- Utility function to check and convert a room JID from real [foo]room1@muc.example.com to virtual room1@muc.foo.example.com
@ -90,10 +89,7 @@ local function internal_room_jid_match_rewrite(room_jid, stanza)
end
-- Ok, rewrite room_jid address to pretty format
local new_node, new_host, new_resource = target_node, muc_domain_prefix..".".. target_subdomain.."."..muc_domain_base, resource;
room_jid = jid.join(new_node, new_host, new_resource);
-- module:log("debug", "Rewrote to %s", room_jid);
return room_jid
return jid.join(target_node, muc_domain_prefix..".".. target_subdomain.."."..muc_domain_base, resource);
end
--- Finds and returns room by its jid
@ -199,8 +195,6 @@ function update_presence_identity(
return tag
end
)
module:log("debug",
"Presence after previous identity stripped: %s", tostring(stanza));
stanza:tag("identity"):tag("user");
for k, v in pairs(user) do
@ -229,8 +223,6 @@ function update_presence_identity(
stanza:up();
end
module:log("debug",
"Presence with identity inserted %s", tostring(stanza))
end
-- Utility function to check whether feature is present and enabled. Allow