changeset 4177:a38e6a8a781a

mod_muc_moderation: Improve error message to be more helpful
author Kim Alvefur <zash@zash.se>
date Tue, 06 Oct 2020 18:57:47 +0200
parents 0016618e0975
children bbd584cee042
files mod_muc_moderation/mod_muc_moderation.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_muc_moderation/mod_muc_moderation.lua	Tue Oct 06 16:07:43 2020 +0100
+++ b/mod_muc_moderation/mod_muc_moderation.lua	Tue Oct 06 18:57:47 2020 +0200
@@ -57,7 +57,7 @@
 	local affiliation = room:get_affiliation(actor);
 	local role = room:get_role(actor_nick) or room:get_default_role(affiliation);
 	if valid_roles[role or "none"] < valid_roles.moderator then
-		origin.send(st.error_reply(stanza, "auth", "forbidden", "Insufficient privileges"));
+		origin.send(st.error_reply(stanza, "auth", "forbidden", "You need a role of at least 'moderator'"));
 		return true;
 	end