aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-06-01 10:21:54 +0200
committerKim Alvefur <zash@zash.se>2018-06-01 10:21:54 +0200
commit83d84ee5d9ce7d667ed64c670c067d7a06e05575 (patch)
tree3306708619e6dfc01d3bfaa8c0566929d832a5ac /plugins
parent3f649eb349dd50a2add4fe10e74874cb7bf39489 (diff)
downloadprosody-83d84ee5d9ce7d667ed64c670c067d7a06e05575.tar.gz
prosody-83d84ee5d9ce7d667ed64c670c067d7a06e05575.zip
MUC: Invert final conditional to be consistent with the other if statements
Diffstat (limited to 'plugins')
-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);