aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/muc.lib.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2021-11-16 12:57:23 +0000
committerMatthew Wild <mwild1@gmail.com>2021-11-16 12:57:23 +0000
commiteecabd740d752249e6e731e2660ad5053caba431 (patch)
tree32e35730d0f1aef4366e8e47ea08dd5a78f5920f /plugins/muc/muc.lib.lua
parent3a21513b61019736e65144bbe6e6323e53c7fde2 (diff)
downloadprosody-eecabd740d752249e6e731e2660ad5053caba431.tar.gz
prosody-eecabd740d752249e6e731e2660ad5053caba431.zip
MUC: Include old affiliation data in affiliation change event
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r--plugins/muc/muc.lib.lua1
1 files changed, 1 insertions, 0 deletions
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);