diff options
author | Kim Alvefur <zash@zash.se> | 2018-06-01 10:20:19 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-06-01 10:20:19 +0200 |
commit | ae3dfd64dad722a3b7a4c5e1ccc0517a9f83dc17 (patch) | |
tree | 7c2f86f8f4ba57a82706a2b96654d815be92f391 | |
parent | 9397f62e228eccf19dbf8058571d3c39669759da (diff) | |
download | prosody-ae3dfd64dad722a3b7a4c5e1ccc0517a9f83dc17.tar.gz prosody-ae3dfd64dad722a3b7a4c5e1ccc0517a9f83dc17.zip |
MUC: Get acting occupant into a local variable for easier access
-rw-r--r-- | plugins/muc/moderated.lib.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/muc/moderated.lib.lua b/plugins/muc/moderated.lib.lua index 7f086555..644b84b6 100644 --- a/plugins/muc/moderated.lib.lua +++ b/plugins/muc/moderated.lib.lua @@ -68,8 +68,9 @@ end); 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 |