plugins/muc/muc.lib.lua
changeset 7388 17929cdacec2
parent 7121 dacc07833b86
parent 7386 69827ee1f951
child 7389 5a9af30d5737
child 7446 4a178edc9847
--- a/plugins/muc/muc.lib.lua	Tue Apr 19 12:33:58 2016 +0200
+++ b/plugins/muc/muc.lib.lua	Tue Apr 19 17:30:30 2016 +0200
@@ -681,6 +681,13 @@
 	if form.attr.type == "cancel" then origin.send(st.reply(stanza)); return; end
 	if form.attr.type ~= "submit" then origin.send(st.error_reply(stanza, "cancel", "bad-request", "Not a submitted form")); return; end
 
+	if form.tags[1] == nil then
+		-- instant room
+		if self.save then self:save(true); end
+		origin.send(st.reply(stanza));
+		return true;
+	end
+
 	local fields, errors, present = 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"));