aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/moderated.lib.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/muc/moderated.lib.lua')
-rw-r--r--plugins/muc/moderated.lib.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/muc/moderated.lib.lua b/plugins/muc/moderated.lib.lua
index 644b84b6..4ec8686a 100644
--- a/plugins/muc/moderated.lib.lua
+++ b/plugins/muc/moderated.lib.lua
@@ -82,9 +82,11 @@ module:hook("muc-voice-response", function(event)
return;
end
- if affected_occupant.role == "visitor" then
- event.room:set_role(actor, affected_occupant.nick, "participant", "Voice granted");
+ if affected_occupant.role ~= "visitor" then
+ return;
end
+
+ event.room:set_role(actor, affected_occupant.nick, "participant", "Voice granted");
end);