aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/muc.lib.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r--plugins/muc/muc.lib.lua13
1 files changed, 9 insertions, 4 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 041187e5..d430f984 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -614,10 +614,15 @@ function room_mt:process_form(origin, stanza)
if form.attr.type == "cancel" then
origin.send(st.reply(stanza));
elseif form.attr.type == "submit" then
- local fields = self:get_form_layout(stanza.attr.from):data(form);
- if fields.FORM_TYPE ~= "http://jabber.org/protocol/muc#roomconfig" then
- origin.send(st.error_reply(stanza, "cancel", "bad-request", "Form is not of type room configuration"));
- return true;
+ local fields;
+ if form.tags[1] == nil then -- Instant room
+ fields = {};
+ else
+ fields = self:get_form_layout(stanza.attr.from):data(form);
+ if fields.FORM_TYPE ~= "http://jabber.org/protocol/muc#roomconfig" then
+ origin.send(st.error_reply(stanza, "cancel", "bad-request", "Form is not of type room configuration"));
+ return true;
+ end
end
local event = {room = self; origin = origin; stanza = stanza; fields = fields; status_codes = {};};