diff options
author | Matthew Wild <mwild1@gmail.com> | 2018-05-16 23:57:30 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2018-05-16 23:57:30 +0100 |
commit | 380e51758c60f7b3116a6749354bd4161d151a51 (patch) | |
tree | c34e255d7770edb6ba7a2f7155f1c3b7bc4a6f90 /plugins/muc/muc.lib.lua | |
parent | 9ddd7d489e083c6cec5741bb9fdd359bed29b052 (diff) | |
download | prosody-380e51758c60f7b3116a6749354bd4161d151a51.tar.gz prosody-380e51758c60f7b3116a6749354bd4161d151a51.zip |
MUC: Restore status codes on presence sent to occupant when their affiliation changes (thanks jonasw)
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r-- | plugins/muc/muc.lib.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 524cc843..a1b42c87 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -1136,9 +1136,13 @@ function room_mt:set_affiliations(actor, jid_affiliation, callback) if not role then -- getting kicked presence_type = "unavailable"; if affiliation == "outcast" then - x:tag("status", {code="301"}):up(); -- banned + -- banned + x:tag("status", {code="301"}):up(); + self_x:tag("status", {code="301"}):up(); else - x:tag("status", {code="321"}):up(); -- affiliation change + -- affiliation change + x:tag("status", {code="321"}):up(); + self_x:tag("status", {code="321"}):up(); end end for nick, occupant in pairs(self._occupants) do |