Mercurial > prosody-hg
comparison plugins/muc/muc.lib.lua @ 6188:f47268c8a8d0
plugins/muc/muc.lib: Status codes should be inside of x element
| author | daurnimator <quae@daurnimator.com> |
|---|---|
| date | Fri, 28 Mar 2014 18:33:38 -0400 |
| parents | c0b4b5d41e55 |
| children | c54ef63f6e20 |
comparison
equal
deleted
inserted
replaced
| 6187:c0b4b5d41e55 | 6188:f47268c8a8d0 |
|---|---|
| 1011 end | 1011 end |
| 1012 origin.send(st.reply(stanza)); | 1012 origin.send(st.reply(stanza)); |
| 1013 | 1013 |
| 1014 if next(changed) then | 1014 if next(changed) then |
| 1015 local msg = st.message({type='groupchat', from=self.jid}) | 1015 local msg = st.message({type='groupchat', from=self.jid}) |
| 1016 :tag('x', {xmlns='http://jabber.org/protocol/muc#user'}):up() | 1016 :tag('x', {xmlns='http://jabber.org/protocol/muc#user'}) |
| 1017 :tag('status', {code = '104'}):up(); | 1017 :tag('status', {code = '104'}):up() |
| 1018 :up(); | |
| 1018 if changed.whois then | 1019 if changed.whois then |
| 1019 local code = (self:get_whois() == 'moderators') and "173" or "172"; | 1020 local code = (self:get_whois() == 'moderators') and "173" or "172"; |
| 1020 msg.tags[1]:tag('status', {code = code}):up(); | 1021 msg.tags[1]:tag('status', {code = code}):up(); |
| 1021 end | 1022 end |
| 1022 self:broadcast_message(msg, false) | 1023 self:broadcast_message(msg, false) |
