aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-11-27 17:01:47 +0100
committerKim Alvefur <zash@zash.se>2018-11-27 17:01:47 +0100
commitc309d32629c0b0f103f32dda5506528e2e1f468b (patch)
tree5a2109f91ba257bb3262c763d0c4d338ddcf4aea /plugins
parentf1e0ef6c69a1a73dc4a8e0a11df33c0e558f773b (diff)
downloadprosody-c309d32629c0b0f103f32dda5506528e2e1f468b.tar.gz
prosody-c309d32629c0b0f103f32dda5506528e2e1f468b.zip
MUC: Move check for explicit room join earlier in room creation flow
Diffstat (limited to 'plugins')
-rw-r--r--plugins/muc/mod_muc.lua2
-rw-r--r--plugins/muc/muc.lib.lua7
2 files changed, 1 insertions, 8 deletions
diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua
index 954bae92..89e67744 100644
--- a/plugins/muc/mod_muc.lua
+++ b/plugins/muc/mod_muc.lua
@@ -453,7 +453,7 @@ for event_name, method in pairs {
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 --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 96f58023..0009e9b2 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -428,13 +428,6 @@ module:hook("muc-occupant-pre-change", function(event)
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 <x>, 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);