aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-06-25 01:38:53 +0100
committerMatthew Wild <mwild1@gmail.com>2009-06-25 01:38:53 +0100
commit386d7fa9266f96a36455ee0cbf3fc7859b63ce95 (patch)
tree245e171da6f9b82905a72d3b5434e97780ff8400
parentf8d5fecf5be78c128a33d8c2983230ac78bb0685 (diff)
downloadprosody-386d7fa9266f96a36455ee0cbf3fc7859b63ce95.tar.gz
prosody-386d7fa9266f96a36455ee0cbf3fc7859b63ce95.zip
mod_component: Rewrite jabber:client stanzas to jabber:component:accept, thanks JaredH!
-rw-r--r--plugins/mod_component.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/mod_component.lua b/plugins/mod_component.lua
index fa2c166f..7e5c87ff 100644
--- a/plugins/mod_component.lua
+++ b/plugins/mod_component.lua
@@ -64,7 +64,12 @@ function handle_component_auth(session, stanza)
-- If component not already created for this host, create one now
if not hosts[session.host].connected then
local send = session.send;
- session.component_session = cm_register_component(session.host, function (_, data) return send(data); end);
+ session.component_session = cm_register_component(session.host, function (_, data)
+ if data.attr and data.attr.xmlns == "jabber:client" then
+ data.attr.xmlns = nil;
+ end
+ return send(data);
+ end);
hosts[session.host].connected = true;
log("info", "Component successfully registered");
else