Software /
code /
prosody
Changeset
8857:f4cc818db995
MUC: Get acting occupant into a local variable for easier access
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 01 Jun 2018 10:20:19 +0200 |
parents | 8856:538bb632a2b6 |
children | 8858:2096742859c1 |
files | plugins/muc/moderated.lib.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/muc/moderated.lib.lua Fri Jun 01 09:16:24 2018 +0200 +++ b/plugins/muc/moderated.lib.lua Fri Jun 01 10:20:19 2018 +0200 @@ -68,8 +68,9 @@ module:hook("muc-voice-response", function(event) local actor = event.stanza.attr.from; local affected_occupant = event.room:get_occupant_by_real_jid(event.fields["muc#jid"]); + local occupant = event.occupant; - if event.occupant.role ~= "moderator" then + if occupant.role ~= "moderator" then return; end