Diff

plugins/mod_register_ibr.lua @ 10286:23b26a414d71

mod_register_ibr, mod_register_limits: Add support for custom error type and defined-condition.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sun, 29 Sep 2019 15:26:18 +0200
parent 10281:f90abf142d53
child 10287:a1c0395a59ae
line wrap: on
line diff
--- a/plugins/mod_register_ibr.lua	Sun Sep 29 15:51:21 2019 +0200
+++ b/plugins/mod_register_ibr.lua	Sun Sep 29 15:26:18 2019 +0200
@@ -168,7 +168,7 @@
 	module:fire_event("user-registering", user);
 	if not user.allowed then
 		log("debug", "Registration disallowed by module: %s", user.reason or "no reason given");
-		session.send(st.error_reply(stanza, "modify", "not-acceptable", user.reason));
+		session.send(st.error_reply(stanza, user.error_type or "modify", user.error_condition or "not-acceptable", user.reason));
 		return true;
 	end