aboutsummaryrefslogtreecommitdiffstats
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
commit5ae44714df607f256b33d46eb6f15771eef815ff (patch)
tree5b27998ff1c741b29d38fb10a49fbf7b9e549e88
parent5fc225f002fd854af9c0cbd3afee5c4f8d8c8ebf (diff)
downloadprosody-5ae44714df607f256b33d46eb6f15771eef815ff.tar.gz
prosody-5ae44714df607f256b33d46eb6f15771eef815ff.zip
plugins/muc/muc.lib: Fix sending occupant jid instead of real jid in <item/> actor
-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