From e950ca77ebd29994699c944ba6758bde441118cf Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 23 Mar 2022 15:29:01 +0100 Subject: mod_external_services: Move error message to correct place (fix #1725) This message was misplaced in c4599a7c534c when the @type and @host check was introduced. --- plugins/mod_external_services.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/mod_external_services.lua b/plugins/mod_external_services.lua index 6daa45c7..ae418fd8 100644 --- a/plugins/mod_external_services.lua +++ b/plugins/mod_external_services.lua @@ -192,7 +192,7 @@ local function handle_credentials(event) local action = stanza.tags[1]; if origin.type ~= "c2s" then - origin.send(st.error_reply(stanza, "auth", "forbidden", "The 'port' and 'type' attributes are required.")); + origin.send(st.error_reply(stanza, "auth", "forbidden")); return true; end @@ -204,7 +204,7 @@ local function handle_credentials(event) local requested_credentials = set.new(); for service in action:childtags("service") do if not service.attr.type or not service.attr.host then - origin.send(st.error_reply(stanza, "modify", "bad-request")); + origin.send(st.error_reply(stanza, "modify", "bad-request", "The 'port' and 'type' attributes are required.")); return true; end -- cgit v1.2.3