Software /
code /
prosody
Diff
plugins/muc/muc.lib.lua @ 6277:f2c9c36979b3
plugins/muc: Fix use of incorrect event on occupant join
author | daurnimator <quae@daurnimator.com> |
---|---|
date | Tue, 17 Jun 2014 15:18:43 -0400 |
parent | 6275:d891fa02e5e5 |
child | 6278:fcc3ef191293 |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Wed Jun 11 17:54:23 2014 -0400 +++ b/plugins/muc/muc.lib.lua Tue Jun 17 15:18:43 2014 -0400 @@ -487,8 +487,11 @@ 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