aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-11-10 05:49:04 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-11-10 05:49:04 +0500
commitf95ecafd2da089b5c2ac79f866efb3c3e25abf38 (patch)
tree569e8eb0dff2ea01ca6017ab77c7b7ce8176027f /plugins
parentd1353b964de8b540445896c2f269c6ba1722f271 (diff)
downloadprosody-f95ecafd2da089b5c2ac79f866efb3c3e25abf38.tar.gz
prosody-f95ecafd2da089b5c2ac79f866efb3c3e25abf38.zip
MUC: Added some more missing :up()s to the stanza building for presence broadcasts (thanks again Zash).
Diffstat (limited to 'plugins')
-rw-r--r--plugins/muc/muc.lib.lua22
1 files 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);