Browse Source

fix: Clear prosody utils and removes a debug statement.

j8
damencho 3 years ago
parent
commit
53cea31bb8

+ 0
- 2
resources/prosody-plugins/mod_muc_domain_mapper.lua View File

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

+ 3
- 11
resources/prosody-plugins/util.lib.lua View File

63
             roomless_iqs[stanza.attr.id] = stanza.attr.to;
63
             roomless_iqs[stanza.attr.id] = stanza.attr.to;
64
         end
64
         end
65
     end
65
     end
66
-    room_jid = jid.join(new_node, new_host, new_resource);
67
-    -- module:log("debug", "Rewrote to %s", room_jid);
68
-    return room_jid
66
+
67
+    return jid.join(new_node, new_host, new_resource);
69
 end
68
 end
70
 
69
 
71
 -- Utility function to check and convert a room JID from real [foo]room1@muc.example.com to virtual room1@muc.foo.example.com
70
 -- Utility function to check and convert a room JID from real [foo]room1@muc.example.com to virtual room1@muc.foo.example.com
90
     end
89
     end
91
 
90
 
92
     -- Ok, rewrite room_jid address to pretty format
91
     -- Ok, rewrite room_jid address to pretty format
93
-    local new_node, new_host, new_resource = target_node, muc_domain_prefix..".".. target_subdomain.."."..muc_domain_base, resource;
94
-    room_jid = jid.join(new_node, new_host, new_resource);
95
-    -- module:log("debug", "Rewrote to %s", room_jid);
96
-    return room_jid
92
+    return jid.join(target_node, muc_domain_prefix..".".. target_subdomain.."."..muc_domain_base, resource);
97
 end
93
 end
98
 
94
 
99
 --- Finds and returns room by its jid
95
 --- Finds and returns room by its jid
199
             return tag
195
             return tag
200
         end
196
         end
201
     )
197
     )
202
-    module:log("debug",
203
-        "Presence after previous identity stripped: %s", tostring(stanza));
204
 
198
 
205
     stanza:tag("identity"):tag("user");
199
     stanza:tag("identity"):tag("user");
206
     for k, v in pairs(user) do
200
     for k, v in pairs(user) do
229
         stanza:up();
223
         stanza:up();
230
     end
224
     end
231
 
225
 
232
-    module:log("debug",
233
-        "Presence with identity inserted %s", tostring(stanza))
234
 end
226
 end
235
 
227
 
236
 -- Utility function to check whether feature is present and enabled. Allow
228
 -- Utility function to check whether feature is present and enabled. Allow

Loading…
Cancel
Save