plugins.smacks: Break less on sending of non-stanzas such as raw strings.

Sun, 10 Feb 2013 00:10:19 +0100

author
Kim Alvefur <zash@zash.se>
date
Sun, 10 Feb 2013 00:10:19 +0100
changeset 320
e04f10664704
parent 319
12b0e5cc72bf
child 321
369d4638d775

plugins.smacks: Break less on sending of non-stanzas such as raw strings.

plugins/smacks.lua file | annotate | diff | comparison | revisions
--- a/plugins/smacks.lua	Mon Feb 04 01:04:01 2013 +0100
+++ b/plugins/smacks.lua	Sun Feb 10 00:10:19 2013 +0100
@@ -53,7 +53,7 @@
 			local old_send = stream.send;
 			function stream.send(stream, stanza)
 				stream:warn("SENDING");
-				if not stanza.attr.xmlns then
+				if stanza.name and not stanza.attr.xmlns then
 					outgoing_queue[#outgoing_queue+1] = stanza;
 					local ret = old_send(stream, stanza);
 					old_send(stream, verse.stanza("r", { xmlns = xmlns_sm }));

mercurial