util.stanza: Make the current element <message> instead of <body> when body text is passed to st.message().

Tue, 21 Sep 2010 17:24:25 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Tue, 21 Sep 2010 17:24:25 +0500
changeset 3502
28887137bb1b
parent 3501
90c18e0355af
child 3503
85e511e01d3c

util.stanza: Make the current element <message> instead of <body> when body text is passed to st.message().

util/stanza.lua file | annotate | diff | comparison | revisions
--- a/util/stanza.lua	Sun Sep 19 17:51:00 2010 +0500
+++ b/util/stanza.lua	Tue Sep 21 17:24:25 2010 +0500
@@ -343,7 +343,7 @@
 	if not body then
 		return stanza("message", attr);
 	else
-		return stanza("message", attr):tag("body"):text(body);
+		return stanza("message", attr):tag("body"):text(body):up();
 	end
 end
 function iq(attr)

mercurial