diff options
author | Kim Alvefur <zash@zash.se> | 2018-06-01 10:21:54 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-06-01 10:21:54 +0200 |
commit | cdc6d66d8e30f6b8dfd1138c648c25705535542b (patch) | |
tree | 3306708619e6dfc01d3bfaa8c0566929d832a5ac /plugins/muc/moderated.lib.lua | |
parent | ae3dfd64dad722a3b7a4c5e1ccc0517a9f83dc17 (diff) | |
download | prosody-cdc6d66d8e30f6b8dfd1138c648c25705535542b.tar.gz prosody-cdc6d66d8e30f6b8dfd1138c648c25705535542b.zip |
MUC: Invert final conditional to be consistent with the other if statements
Diffstat (limited to 'plugins/muc/moderated.lib.lua')
-rw-r--r-- | plugins/muc/moderated.lib.lua | 6 |
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); |