util/stanza.lua
changeset 8897 7273fb6af831
parent 8893 3490bc478804
child 9002 a2a4c225a3f8
equal deleted inserted replaced
8896:eb710675f7f8 8897:7273fb6af831
   114 	return self;
   114 	return self;
   115 end
   115 end
   116 
   116 
   117 function stanza_mt:text(text)
   117 function stanza_mt:text(text)
   118 	if text ~= nil and text ~= "" then
   118 	if text ~= nil and text ~= "" then
   119 		check_text(text, "text");
       
   120 		local last_add = self.last_add;
   119 		local last_add = self.last_add;
   121 		(last_add and last_add[#last_add] or self):add_direct_child(text);
   120 		(last_add and last_add[#last_add] or self):add_direct_child(text);
   122 	end
   121 	end
   123 	return self;
   122 	return self;
   124 end
   123 end