Diff

plugins/muc/muc.lib.lua @ 10553:4d8119ffd433

MUC: Make note to handle configuration form errors [luacheck]
author Kim Alvefur <zash@zash.se>
date Mon, 23 Dec 2019 22:28:04 +0100
parent 10550:0566b45da987
child 10662:46373b97e648
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua	Mon Dec 23 22:27:25 2019 +0100
+++ b/plugins/muc/muc.lib.lua	Mon Dec 23 22:28:04 2019 +0100
@@ -844,10 +844,12 @@
 	if form.attr.type == "cancel" then
 		origin.send(st.reply(stanza));
 	elseif form.attr.type == "submit" then
+		-- luacheck: ignore 231/errors
 		local fields, errors, present;
 		if form.tags[1] == nil then -- Instant room
 			fields, present = {}, {};
 		else
+			-- FIXME handle form errors
 			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"));