# HG changeset patch # User Kim Alvefur # Date 1461079239 -7200 # Node ID 69827ee1f951e844f02b892f34639a17f5b97d08 # Parent de76ded98b842f92bf7aef0c68aee18b293073d3 MUC: Accept missing form as "instant room" request (fixes #377) diff -r de76ded98b84 -r 69827ee1f951 plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Sun Apr 03 15:18:21 2016 +0200 +++ b/plugins/muc/muc.lib.lua Tue Apr 19 17:20:39 2016 +0200 @@ -668,6 +668,14 @@ 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 = self:get_form_layout():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; end