Comparison

plugins/muc/muc.lib.lua @ 8931:ae84911c1441

MUC: Avoid sending error for unavailable presence in GC 1.0 check
author Kim Alvefur <zash@zash.se>
date Tue, 26 Jun 2018 16:27:07 +0200
parent 8915:2502be210a85
child 9002:1fcddb4a4d16
comparison
equal deleted inserted replaced
8930:2e45b1b47918 8931:ae84911c1441
470 local real_jid = stanza.attr.from; 470 local real_jid = stanza.attr.from;
471 local bare_jid = jid_bare(real_jid); 471 local bare_jid = jid_bare(real_jid);
472 local orig_occupant = self:get_occupant_by_real_jid(real_jid); 472 local orig_occupant = self:get_occupant_by_real_jid(real_jid);
473 local muc_x = stanza:get_child("x", "http://jabber.org/protocol/muc"); 473 local muc_x = stanza:get_child("x", "http://jabber.org/protocol/muc");
474 474
475 if orig_occupant == nil and not muc_x then 475 if orig_occupant == nil and not muc_x and stanza.attr.type == nil then
476 module:log("debug", "Attempted join without <x>, possibly desynced"); 476 module:log("debug", "Attempted join without <x>, possibly desynced");
477 origin.send(st.error_reply(stanza, "cancel", "item-not-found", "You must join the room before sending presence updates")); 477 origin.send(st.error_reply(stanza, "cancel", "item-not-found", "You must join the room before sending presence updates"));
478 return true; 478 return true;
479 end 479 end
480 480