aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-02-18 14:28:52 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-02-18 14:28:52 +0500
commitb9810d3b364fce300037e65fea4a4829c6187ccc (patch)
tree8e56d9b19de9e3d650f3e60a8e3116df4945e3ce /plugins
parent15b32576a96cdc8b594e8c4f5b11680c3c697ea2 (diff)
downloadprosody-b9810d3b364fce300037e65fea4a4829c6187ccc.tar.gz
prosody-b9810d3b364fce300037e65fea4a4829c6187ccc.zip
MUC: Allow role changes based on JIDs.
(transplanted from a4879b1e6cde5aedb6bd5827d710b6dba5e8a736)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/muc/muc.lib.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index f5b82e0d..60687886 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -463,6 +463,9 @@ function room_mt:handle_to_room(origin, stanza) -- presence changes and groupcha
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._occupants[self.jid.."/"..item.attr.nick];
if occupant then item.attr.jid = occupant.jid; end
+ elseif not item.attr.nick and item.attr.jid then
+ local nick = self._jid_nick[item.attr.jid];
+ if nick then item.attr.nick = select(3, jid_split(nick)); end
end
local reason = item.tags[1] and item.tags[1].name == "reason" and #item.tags[1] == 1 and item.tags[1][1];
if item.attr.affiliation and item.attr.jid and not item.attr.role then