aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/mod_register_ibr.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/mod_register_ibr.lua b/plugins/mod_register_ibr.lua
index af10970e..dc7168b4 100644
--- a/plugins/mod_register_ibr.lua
+++ b/plugins/mod_register_ibr.lua
@@ -140,10 +140,12 @@ module:hook("stanza/iq/jabber:iq:register:query", function(event)
local data, errors = parse_response(query);
if errors then
log("debug", "Error parsing registration form:");
+ local textual_errors = {};
for field, err in pairs(errors) do
log("debug", "Field %q: %s", field, err);
+ table.insert(textual_errors, ("%s: %s"):format(field:gsub("^%a", string.upper), err));
end
- session.send(st.error_reply(stanza, "modify", "not-acceptable"));
+ session.send(st.error_reply(stanza, "modify", "not-acceptable", table.concat(textual_errors, "\n")));
return true;
end