Software / code / prosody
Changeset
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 | 8857:f4cc818db995 |
| children | 8859:11176f47a03a |
| files | plugins/muc/moderated.lib.lua |
| diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
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);