mod_presence: Removed dead code
[prosody.git] / plugins / mod_component.lua
index fa2c166fb0b7198d1fd493fd71cfd357f7f409da..7e5c87ffbc38f1000ab2d20e5407b0e4dd2a2ffe 100644 (file)
@@ -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