diff options
author | daurnimator <quae@daurnimator.com> | 2014-09-05 11:28:28 -0400 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2014-09-05 11:28:28 -0400 |
commit | 8728ee5e5a3925588e5502a87a3466ec8eebc44a (patch) | |
tree | a36e3ea532596536b5accca93922634b27037a89 /plugins/muc | |
parent | f4e4cfbd02d830efd60bc07af0b7d953c77bab88 (diff) | |
download | prosody-8728ee5e5a3925588e5502a87a3466ec8eebc44a.tar.gz prosody-8728ee5e5a3925588e5502a87a3466ec8eebc44a.zip |
plugins/muc/muc.lib: Add muc-set-affiliation event
Diffstat (limited to 'plugins/muc')
-rw-r--r-- | plugins/muc/muc.lib.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 31b5c559..4e461df6 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -1049,6 +1049,17 @@ function room_mt:set_affiliation(actor, jid, affiliation, reason) end if self.save then self:save(); end + + module:fire_event("muc-set-affiliation", { + room = self; + actor = actor; + jid = jid; + affiliation = affiliation or "none"; + reason = reason; + previous_affiliation = target_affiliation; + in_room = next(occupants_updated) ~= nil; + }); + return true; end |