# HG changeset patch # User Jonas Schäfer # Date 1677069196 -3600 # Node ID 432587ad1642c3152bcd3986bac64e121ca41390 # Parent 354832098f2f45700473062c107a60afa417eb06 mod_muc_rtbl: fix traceback because of scoping error There is no "event" there, we have to use the occupant data instead. That's what you get for moving code around! diff -r 354832098f2f -r 432587ad1642 mod_muc_rtbl/mod_muc_rtbl.lua --- a/mod_muc_rtbl/mod_muc_rtbl.lua Tue Feb 21 21:41:19 2023 +0100 +++ b/mod_muc_rtbl/mod_muc_rtbl.lua Wed Feb 22 13:33:16 2023 +0100 @@ -94,13 +94,13 @@ function update_hashes(occupant) local bare_hash, host_hash; if not occupant.mod_muc_rtbl_bare_hash then - bare_hash = sha256(jid.bare(event.stanza.attr.from), true); + bare_hash = sha256(jid.bare(occupant.bare_jid), true); occupant.mod_muc_rtbl_bare_hash = bare_hash; else bare_hash = occupant.mod_muc_rtbl_bare_hash; end if not occupant.mod_muc_rtbl_host_hash then - host_hash = sha256(jid.host(event.stanza.attr.from), true); + host_hash = sha256(jid.host(occupant.bare_jid), true); event.occupant.mod_muc_rtbl_host_hash = host_hash; else host_hash = event.occupant.mod_muc_rtbl_host_hash;