Changeset

231:9712693ae40a

plugins.groupchat: Use stanza:get_child_text()
author Kim Alvefur <zash@zash.se>
date Tue, 08 Nov 2011 10:10:50 +0100
parents 230:44a6da432e7e
children 232:5b49de3aa0f3
files plugins/groupchat.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/groupchat.lua	Sun Nov 06 21:09:07 2011 +0100
+++ b/plugins/groupchat.lua	Tue Nov 08 10:10:50 2011 +0100
@@ -20,14 +20,14 @@
 		if room and room.opts.source and stanza.attr.to ~= room.opts.source then return end
 		if room then
 			local nick = select(3, jid.split(stanza.attr.from));
-			local body = stanza:get_child("body");
+			local body = stanza:get_child_text("body");
 			local delay = stanza:get_child("delay", xmlns_delay);
 			local event = {
 				room_jid = room_jid;
 				room = room;
 				sender = room.occupants[nick];
 				nick = nick;
-				body = (body and body:get_text()) or nil;
+				body = body;
 				stanza = stanza;
 				delay = (delay and delay.attr.stamp);
 			};