Comparison

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
parent 8857:f4cc818db995
child 8859:11176f47a03a
comparison
equal deleted inserted replaced
8857:f4cc818db995 8858:2096742859c1
80 80
81 if not affected_occupant then 81 if not affected_occupant then
82 return; 82 return;
83 end 83 end
84 84
85 if affected_occupant.role == "visitor" then 85 if affected_occupant.role ~= "visitor" then
86 event.room:set_role(actor, affected_occupant.nick, "participant", "Voice granted"); 86 return;
87 end 87 end
88
89 event.room:set_role(actor, affected_occupant.nick, "participant", "Voice granted");
88 end); 90 end);
89 91
90 92
91 return { 93 return {
92 get = get_moderated; 94 get = get_moderated;