changeset 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 (20 months ago)
parents c35f3c1762b5
children 14b6397cd6de
files mod_muc_rtbl/mod_muc_rtbl.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_muc_rtbl/mod_muc_rtbl.lua	Mon Apr 17 08:26:20 2023 +0200
+++ b/mod_muc_rtbl/mod_muc_rtbl.lua	Mon Apr 17 14:31:50 2023 +0100
@@ -153,7 +153,7 @@
 
 module:hook("muc-private-message", function(event)
 	local occupant = event.room:get_occupant_by_nick(event.stanza.attr.from);
-	local affiliation = event.room:get_affiliation(event.occupant.bare_jid);
+	local affiliation = event.room:get_affiliation(occupant.bare_jid);
 	if affiliation and affiliation ~= "none" then
 		-- Skip check for affiliated users
 		return;