# HG changeset patch # User Kim Alvefur # Date 1636211978 -3600 # Node ID 3a7953a5ee5b1ae7666c4bd7637b179a6367eb5a # Parent a6b94f4fb0654d5fe68807bb19165b75202c9b90 mod_muc_moderation: Clarify behavior with a comment diff -r a6b94f4fb065 -r 3a7953a5ee5b mod_muc_moderation/mod_muc_moderation.lua --- a/mod_muc_moderation/mod_muc_moderation.lua Thu Nov 04 20:19:31 2021 +0100 +++ b/mod_muc_moderation/mod_muc_moderation.lua Sat Nov 06 16:19:38 2021 +0100 @@ -55,6 +55,8 @@ local actor = stanza.attr.from; local actor_nick = room:get_occupant_jid(actor); local affiliation = room:get_affiliation(actor); + -- Retrieve their current role, iff they are in the room, otherwise what they + -- would have based on affiliation. 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", "You need a role of at least 'moderator'"));