Mercurial > prosody-hg
diff plugins/muc/moderated.lib.lua @ 8858:2096742859c1
MUC: Invert final conditional to be consistent with the other if statements
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 01 Jun 2018 10:21:54 +0200 |
| parents | f4cc818db995 |
| children | 11176f47a03a |
line wrap: on
line diff
--- a/plugins/muc/moderated.lib.lua Fri Jun 01 10:20:19 2018 +0200 +++ b/plugins/muc/moderated.lib.lua Fri Jun 01 10:21:54 2018 +0200 @@ -82,9 +82,11 @@ 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);
