# HG changeset patch # User Kim Alvefur # Date 1320743450 -3600 # Node ID 9712693ae40a7bdc675f7b017700c5ca453a6f40 # Parent 44a6da432e7e036d388eaca3a64f1091b69b37c8 plugins.groupchat: Use stanza:get_child_text() diff -r 44a6da432e7e -r 9712693ae40a plugins/groupchat.lua --- 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); };