Software /
code /
prosody
Comparison
plugins/muc/muc.lib.lua @ 10805:d17392022cb2
mod_muc: let event handlers modify cloned presence
Updates #1533
author | JC Brand <jc@opkode.com> |
---|---|
date | Wed, 22 Apr 2020 16:12:15 +0200 |
parent | 10804:4dc57789f51b |
child | 11143:818255f49297 |
comparison
equal
deleted
inserted
replaced
10804:4dc57789f51b | 10805:d17392022cb2 |
---|---|
310 -- They get an unavailable | 310 -- They get an unavailable |
311 self:route_to_occupant(occupant, self_p); | 311 self:route_to_occupant(occupant, self_p); |
312 else | 312 else |
313 -- use their own presences as templates | 313 -- use their own presences as templates |
314 for full_jid, pr in occupant:each_session() do | 314 for full_jid, pr in occupant:each_session() do |
315 pr = st.clone(pr); | |
315 module:fire_event("muc-build-occupant-presence", { room = self, occupant = occupant, stanza = pr }); | 316 module:fire_event("muc-build-occupant-presence", { room = self, occupant = occupant, stanza = pr }); |
316 pr = st.clone(pr); | |
317 pr.attr.to = full_jid; | 317 pr.attr.to = full_jid; |
318 pr:add_child(self_x); | 318 pr:add_child(self_x); |
319 self:route_stanza(pr); | 319 self:route_stanza(pr); |
320 end | 320 end |
321 end | 321 end |