Mercurial > prosody-hg
diff plugins/muc/muc.lib.lua @ 11912:037b2c019f58
MUC: Include old affiliation data in affiliation change event
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Tue, 16 Nov 2021 12:57:23 +0000 |
| parents | 0e7dedd8b18d |
| children | e0b58717f0c5 |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Tue Nov 16 12:57:04 2021 +0000 +++ b/plugins/muc/muc.lib.lua Tue Nov 16 12:57:23 2021 +0000 @@ -1431,6 +1431,7 @@ 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);
