Comparison

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
comparison
equal deleted inserted replaced
6276:9290a2906feb 6277:f2c9c36979b3
485 -- TODO: new status code to inform client this was the multi-session it left? 485 -- TODO: new status code to inform client this was the multi-session it left?
486 pr:add_child(x); 486 pr:add_child(x);
487 self:route_stanza(pr); 487 self:route_stanza(pr);
488 end 488 end
489 489
490 if orig_occupant == nil and is_first_dest_session then 490 if orig_occupant == nil then
491 module:fire_event("muc-occupant-joined", {room = self; nick = dest_occupant.nick; stanza = stanza;}); 491 if is_first_dest_session then
492 module:fire_event("muc-occupant-joined", {room = self; nick = dest_occupant.nick; stanza = stanza;});
493 end
494 module:fire_event("muc-occupant-session-new", {room = self; nick = dest_occupant.nick; stanza = stanza; jid = real_jid;});
492 end 495 end
493 end 496 end
494 elseif type ~= 'result' then -- bad type 497 elseif type ~= 'result' then -- bad type
495 if type ~= 'visible' and type ~= 'invisible' then -- COMPAT ejabberd can broadcast or forward XEP-0018 presences 498 if type ~= 'visible' and type ~= 'invisible' then -- COMPAT ejabberd can broadcast or forward XEP-0018 presences
496 origin.send(st.error_reply(stanza, "modify", "bad-request")); -- FIXME correct error? 499 origin.send(st.error_reply(stanza, "modify", "bad-request")); -- FIXME correct error?