diff options
author | daurnimator <quae@daurnimator.com> | 2014-06-17 15:18:43 -0400 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2014-06-17 15:18:43 -0400 |
commit | 1694d8908a486fdc1fcee99b98cf5a8df65be13b (patch) | |
tree | cbc89142bea59e6fbe4308d3e653a65a9bb1594c /plugins/muc/muc.lib.lua | |
parent | 75d78ae9e40c0d0b972842d30a35387f161823d5 (diff) | |
download | prosody-1694d8908a486fdc1fcee99b98cf5a8df65be13b.tar.gz prosody-1694d8908a486fdc1fcee99b98cf5a8df65be13b.zip |
plugins/muc: Fix use of incorrect event on occupant join
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r-- | plugins/muc/muc.lib.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 85c256a2..c645869e 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -487,8 +487,11 @@ function room_mt:handle_presence_to_occupant(origin, stanza) self:route_stanza(pr); end - if orig_occupant == nil and is_first_dest_session then - module:fire_event("muc-occupant-joined", {room = self; nick = dest_occupant.nick; stanza = stanza;}); + if orig_occupant == nil then + if is_first_dest_session then + module:fire_event("muc-occupant-joined", {room = self; nick = dest_occupant.nick; stanza = stanza;}); + end + module:fire_event("muc-occupant-session-new", {room = self; nick = dest_occupant.nick; stanza = stanza; jid = real_jid;}); end end elseif type ~= 'result' then -- bad type |