util/stanza.lua
changeset 8648 06c73b010488
parent 8643 8f13ec2ceb06
child 8892 c4e430c69f88
--- a/util/stanza.lua	Wed Mar 21 23:15:30 2018 +0100
+++ b/util/stanza.lua	Wed Mar 21 23:20:26 2018 +0100
@@ -101,6 +101,10 @@
 	return self:tag("body", attr):text(text);
 end
 
+function stanza_mt:text_tag(name, text, attr, namespaces)
+	return self:tag(name, attr, namespaces):text(text):up();
+end
+
 function stanza_mt:tag(name, attr, namespaces)
 	local s = new_stanza(name, attr, namespaces);
 	local last_add = self.last_add;