Changeset

1405:19269d278c38

mod_component: Rewrite jabber:client stanzas to jabber:component:accept, thanks JaredH!
author Matthew Wild <mwild1@gmail.com>
date Thu, 25 Jun 2009 01:38:53 +0100
parents 1404:12abd2da8885
children 1406:83c6fb3d9e73
files plugins/mod_component.lua
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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