aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/muc.lib.lua
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2014-03-28 13:11:11 -0400
committerdaurnimator <quae@daurnimator.com>2014-03-28 13:11:11 -0400
commit46f318fa4f74a2194d98e8b082c97f7a62296077 (patch)
tree5b27998ff1c741b29d38fb10a49fbf7b9e549e88 /plugins/muc/muc.lib.lua
parent6334074f11baac6bd8101e205f038e8494553bfe (diff)
downloadprosody-46f318fa4f74a2194d98e8b082c97f7a62296077.tar.gz
prosody-46f318fa4f74a2194d98e8b082c97f7a62296077.zip
plugins/muc/muc.lib: Fix sending occupant jid instead of real jid in <item/> actor
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r--plugins/muc/muc.lib.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index b3c1c174..0d1e4170 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -163,18 +163,18 @@ end
function room_mt:build_item_list(occupant, x, is_anonymous, nick, actor, reason)
local affiliation = self:get_affiliation(occupant.bare_jid);
local role = occupant.role;
- local actor_jid = actor and self:get_occupant_jid(actor);
+ local actor_attr;
if actor then
- actor = {nick = select(3,jid_split(actor_jid))};
+ actor_attr = {nick = select(3,jid_split(self:get_occupant_jid(actor)))};
end
if is_anonymous then
- add_item(x, affiliation, role, nil, nick, actor, reason);
+ add_item(x, affiliation, role, nil, nick, actor_attr, reason);
else
- if actor_jid then
- actor.jid = actor_jid;
+ if actor_attr then
+ actor_attr.jid = actor;
end
for real_jid, session in occupant:each_session() do
- add_item(x, affiliation, role, real_jid, nick, actor, reason);
+ add_item(x, affiliation, role, real_jid, nick, actor_attr, reason);
end
end
return x