plugins/mod_component.lua

changeset 1405
19269d278c38
parent 1108
368754c54045
child 1523
841d61be198f
--- a/plugins/mod_component.lua	Wed Jun 24 20:09:44 2009 +0500
+++ b/plugins/mod_component.lua	Thu Jun 25 01:38:53 2009 +0100
@@ -64,7 +64,12 @@
 	-- 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

mercurial