Changeset

150:728cc7f2f0c2

verse.component: Namespacing fixes
author Matthew Wild <mwild1@gmail.com>
date Tue, 09 Nov 2010 19:57:52 +0000
parents 149:f5c524412939
children 151:75016d851648
files component.lua
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/component.lua	Thu Oct 28 19:37:22 2010 +0100
+++ b/component.lua	Tue Nov 09 19:57:52 2010 +0000
@@ -18,7 +18,7 @@
 local stream_callbacks = {
 	stream_ns = xmlns_stream,
 	stream_tag = "stream",
-	 default_ns = "jabber:client" };
+	 default_ns = xmlns_component };
 	
 function stream_callbacks.streamopened(stream, attr)
 	stream.stream_id = attr.id;
@@ -35,8 +35,8 @@
 function stream_callbacks.handlestanza(stream, stanza)
 	if stanza.attr.xmlns == xmlns_stream then
 		return stream:event("stream-"..stanza.name, stanza);
-	elseif stanza.attr.xmlns then
-		return stream:event("stream/"..stanza.attr.xmlns, stanza);
+	elseif stanza.attr.xmlns or stanza.name == "handshake" then
+		return stream:event("stream/"..(stanza.attr.xmlns or xmlns_component), stanza);
 	end
 
 	return stream:event("stanza", stanza);