From eecabd740d752249e6e731e2660ad5053caba431 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Tue, 16 Nov 2021 12:57:23 +0000 Subject: MUC: Include old affiliation data in affiliation change event --- plugins/muc/muc.lib.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins/muc') diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index ef418b2b..8fbe2376 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -1431,6 +1431,7 @@ function room_mt:set_affiliation(actor, jid, affiliation, reason, data) reason = reason; previous_affiliation = target_affiliation or "none"; data = data and data or nil; -- coerce false to nil + previous_data = self._affiliation_data[jid] or nil; }; module:fire_event("muc-pre-set-affiliation", event_data); -- cgit v1.2.3