Comparison

plugins/muc/mod_muc.lua @ 9647:0f43b901c854

MUC: Move check for explicit room join earlier in room creation flow
author Kim Alvefur <zash@zash.se>
date Tue, 27 Nov 2018 17:01:47 +0100
parent 9626:4d3ab7153153
child 10353:7b602e13c3b6
comparison
equal deleted inserted replaced
9646:eb543e4a47e2 9647:0f43b901c854
451 end 451 end
452 end 452 end
453 453
454 if room == nil then 454 if room == nil then
455 -- Watch presence to create rooms 455 -- Watch presence to create rooms
456 if stanza.attr.type == nil and stanza.name == "presence" then 456 if stanza.attr.type == nil and stanza.name == "presence" and stanza:get_child("x", "http://jabber.org/protocol/muc") then
457 room = muclib.new_room(room_jid); 457 room = muclib.new_room(room_jid);
458 return room:handle_first_presence(origin, stanza); 458 return room:handle_first_presence(origin, stanza);
459 elseif stanza.attr.type ~= "error" then 459 elseif stanza.attr.type ~= "error" then
460 origin.send(st.error_reply(stanza, "cancel", "item-not-found")); 460 origin.send(st.error_reply(stanza, "cancel", "item-not-found"));
461 return true; 461 return true;