Software /
code /
prosody
Changeset
2667:82f3820758ed
MUC: Allow role changes based on JIDs.
(transplanted from a4879b1e6cde5aedb6bd5827d710b6dba5e8a736)
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Thu, 18 Feb 2010 14:28:52 +0500 |
parents | 2665:c26bfc0359bb |
children | 2668:4ddacf58f43d 2669:9dbe9acf82e8 |
files | plugins/muc/muc.lib.lua |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Thu Feb 18 18:57:37 2010 +0000 +++ b/plugins/muc/muc.lib.lua Thu Feb 18 14:28:52 2010 +0500 @@ -514,6 +514,9 @@ 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