From f95ecafd2da089b5c2ac79f866efb3c3e25abf38 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Wed, 10 Nov 2010 05:49:04 +0500 Subject: MUC: Added some more missing :up()s to the stanza building for presence broadcasts (thanks again Zash). --- plugins/muc/muc.lib.lua | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index cb8bcce7..b7b23311 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -656,18 +656,18 @@ function room_mt:process_form(origin, stanza) origin.send(st.reply(stanza)); if dirty or whois_changed then - local msg = st.message({type='groupchat', from=self.jid}) - :tag('x', {xmlns='http://jabber.org/protocol/muc#user'}):up() + local msg = st.message({type='groupchat', from=self.jid}) + :tag('x', {xmlns='http://jabber.org/protocol/muc#user'}):up() - if dirty then - msg.tags[1]:tag('status', {code = '104'}) - end - if whois_changed then - local code = (whois == 'moderators') and 173 or 172 - msg.tags[1]:tag('status', {code = code}) - end + if dirty then + msg.tags[1]:tag('status', {code = '104'}):up(); + end + if whois_changed then + local code = (whois == 'moderators') and "173" or "172"; + msg.tags[1]:tag('status', {code = code}):up(); + end - self:broadcast_message(msg, false) + self:broadcast_message(msg, false) end end @@ -1022,7 +1022,7 @@ function room_mt:_route_stanza(stanza) end end if self._data.whois == 'anyone' then - muc_child:tag('status', { code = '100' }); + muc_child:tag('status', { code = '100' }):up(); end end self:route_stanza(stanza); -- cgit v1.2.3