aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-04-19 17:20:39 +0200
committerKim Alvefur <zash@zash.se>2016-04-19 17:20:39 +0200
commit16e99317ac9d7d5ec736883ccbf1581fe6ad587f (patch)
treecd6111df8c0c1a405001251e1fd00074d9e00573 /plugins
parent4ae4d1e53d3618ad24a6ee2811784151878e4170 (diff)
downloadprosody-16e99317ac9d7d5ec736883ccbf1581fe6ad587f.tar.gz
prosody-16e99317ac9d7d5ec736883ccbf1581fe6ad587f.zip
MUC: Accept missing form as "instant room" request (fixes #377)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/muc/muc.lib.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 5879c256..f8e8f74d 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -668,6 +668,14 @@ function room_mt:process_form(origin, stanza)
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