# HG changeset patch # User Kim Alvefur # Date 1543334507 -3600 # Node ID 0f43b901c854d1edae1a8d422b2bae7651c0dbe8 # Parent eb543e4a47e20df383beff0ad6367040a1da09e1 MUC: Move check for explicit room join earlier in room creation flow diff -r eb543e4a47e2 -r 0f43b901c854 plugins/muc/mod_muc.lua --- a/plugins/muc/mod_muc.lua Mon Nov 26 19:48:17 2018 +0100 +++ b/plugins/muc/mod_muc.lua Tue Nov 27 17:01:47 2018 +0100 @@ -453,7 +453,7 @@ if room == nil then -- Watch presence to create rooms - if stanza.attr.type == nil and stanza.name == "presence" then + if stanza.attr.type == nil and stanza.name == "presence" and stanza:get_child("x", "http://jabber.org/protocol/muc") then room = muclib.new_room(room_jid); return room:handle_first_presence(origin, stanza); elseif stanza.attr.type ~= "error" then diff -r eb543e4a47e2 -r 0f43b901c854 plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Mon Nov 26 19:48:17 2018 +0100 +++ b/plugins/muc/muc.lib.lua Tue Nov 27 17:01:47 2018 +0100 @@ -428,13 +428,6 @@ end, 1); function room_mt:handle_first_presence(origin, stanza) - if not stanza:get_child("x", "http://jabber.org/protocol/muc") then - module:log("debug", "Room creation without , possibly desynced"); - - origin.send(st.error_reply(stanza, "cancel", "item-not-found")); - return true; - end - local real_jid = stanza.attr.from; local dest_jid = stanza.attr.to; local bare_jid = jid_bare(real_jid);