From 83d84ee5d9ce7d667ed64c670c067d7a06e05575 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 1 Jun 2018 10:21:54 +0200 Subject: MUC: Invert final conditional to be consistent with the other if statements --- plugins/muc/moderated.lib.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins') 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); -- cgit v1.2.3