diff options
author | Matthew Wild <mwild1@gmail.com> | 2018-10-21 16:04:54 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2018-10-21 16:04:54 +0100 |
commit | 7b7f153a80fc0a113a6fcce7aa0a14212ce85c9e (patch) | |
tree | 9d3034445b7eb400660c86a2f905cfb911a0484f /plugins | |
parent | fd61b755c98701f96c8e1fd18e2280cee83a48da (diff) | |
download | prosody-7b7f153a80fc0a113a6fcce7aa0a14212ce85c9e.tar.gz prosody-7b7f153a80fc0a113a6fcce7aa0a14212ce85c9e.zip |
MUC: Use the bare JID when performing a lookup for COMPAT with clients that don't set it (fixes #1224)
The full JID is never meant to be the target of affiliation changes.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/muc/muc.lib.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 8e039457..d8fd7128 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -922,7 +922,7 @@ function room_mt:handle_admin_query_set_command(origin, stanza) if not item.attr.jid and item.attr.nick then -- COMPAT Workaround for Miranda sending 'nick' instead of 'jid' when changing affiliation local occupant = self:get_occupant_by_nick(self.jid.."/"..item.attr.nick); - if occupant then item.attr.jid = occupant.jid; end + if occupant then item.attr.jid = occupant.bare_jid; end elseif item.attr.role and not item.attr.nick and item.attr.jid then -- Role changes should use nick, but we have a JID so pull the nick from that local nick = self:get_occupant_jid(item.attr.jid); |