Software /
code /
prosody
Comparison
plugins/muc/muc.lib.lua @ 7011:2d5751b2f21c
MUC: Fix incorrect nesting of status codes when room config changes (fixes #579)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 16 Dec 2015 16:41:48 +0000 |
parent | 6923:f755e0bdc60a |
child | 7012:990b4ddaf582 |
child | 7383:69827ee1f951 |
comparison
equal
deleted
inserted
replaced
7010:001b3cff4ed8 | 7011:2d5751b2f21c |
---|---|
734 if self.save then self:save(true); end | 734 if self.save then self:save(true); end |
735 origin.send(st.reply(stanza)); | 735 origin.send(st.reply(stanza)); |
736 | 736 |
737 if dirty or whois_changed then | 737 if dirty or whois_changed then |
738 local msg = st.message({type='groupchat', from=self.jid}) | 738 local msg = st.message({type='groupchat', from=self.jid}) |
739 :tag('x', {xmlns='http://jabber.org/protocol/muc#user'}):up() | 739 :tag('x', {xmlns='http://jabber.org/protocol/muc#user'}); |
740 | 740 |
741 if dirty then | 741 if dirty then |
742 msg.tags[1]:tag('status', {code = '104'}):up(); | 742 msg.tags[1]:tag('status', {code = '104'}):up(); |
743 end | 743 end |
744 if whois_changed then | 744 if whois_changed then |
745 local code = (whois == 'moderators') and "173" or "172"; | 745 local code = (whois == 'moderators') and "173" or "172"; |
746 msg.tags[1]:tag('status', {code = code}):up(); | 746 msg.tags[1]:tag('status', {code = code}):up(); |
747 end | 747 end |
748 msg:up(); | |
748 | 749 |
749 self:broadcast_message(msg, false) | 750 self:broadcast_message(msg, false) |
750 end | 751 end |
751 end | 752 end |
752 | 753 |