diff options
author | Matthew Wild <mwild1@gmail.com> | 2020-04-11 16:41:52 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2020-04-11 16:41:52 +0100 |
commit | 0bdf52fd9026c4f1925377f4f79012b401ccf562 (patch) | |
tree | f557f6b4371b19c88f7ff49688da4c53fc6cbcc6 /plugins/muc/muc.lib.lua | |
parent | c2744b2c1122b04149fe4af8f008ccf4f1f3cb34 (diff) | |
download | prosody-0bdf52fd9026c4f1925377f4f79012b401ccf562.tar.gz prosody-0bdf52fd9026c4f1925377f4f79012b401ccf562.zip |
MUC: Add new event 'muc-build-occupant-presence' for plugins to extend occupant presence
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r-- | plugins/muc/muc.lib.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 4f265cf8..3b126522 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -237,6 +237,7 @@ function room_mt:publicise_occupant_status(occupant, x, nick, actor, reason, pre occupant = occupant; nick = nick; actor = actor; reason = reason; } + module:fire_event("muc-build-occupant-presence", event); module:fire_event("muc-broadcast-presence", event); -- Allow muc-broadcast-presence listeners to change things @@ -342,6 +343,7 @@ function room_mt:send_occupant_list(to, filter) local pres = st.clone(occupant:get_presence()); pres.attr.to = to; pres:add_child(x); + module:fire_event("muc-build-occupant-presence", { room = self, occupant = occupant, stanza = pres }); if to_bare == occupant.bare_jid or broadcast_roles[occupant.role or "none"] then self:route_stanza(pres); end |