Software /
code /
prosody-modules
Comparison
mod_muc_rtbl/mod_muc_rtbl.lua @ 5352:f6577cdb1d91
mod_muc_rtbl: Use correct occupant object
There is no 'occupant' property for this event.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 17 Apr 2023 14:31:50 +0100 |
parent | 5274:8cfbcbc0fb89 |
child | 5914:ba71fdc8ea73 |
comparison
equal
deleted
inserted
replaced
5351:c35f3c1762b5 | 5352:f6577cdb1d91 |
---|---|
151 end | 151 end |
152 end); | 152 end); |
153 | 153 |
154 module:hook("muc-private-message", function(event) | 154 module:hook("muc-private-message", function(event) |
155 local occupant = event.room:get_occupant_by_nick(event.stanza.attr.from); | 155 local occupant = event.room:get_occupant_by_nick(event.stanza.attr.from); |
156 local affiliation = event.room:get_affiliation(event.occupant.bare_jid); | 156 local affiliation = event.room:get_affiliation(occupant.bare_jid); |
157 if affiliation and affiliation ~= "none" then | 157 if affiliation and affiliation ~= "none" then |
158 -- Skip check for affiliated users | 158 -- Skip check for affiliated users |
159 return; | 159 return; |
160 end | 160 end |
161 | 161 |