Software /
code /
prosody
Comparison
plugins/muc/muc.lib.lua @ 6317:ec57067c1e0d
mod_muc/muc.lib: Pass all info to muc-broadcast-presence handlers that would be required to use room:build_item_list() - useful for plugins
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 25 Jul 2014 18:32:15 +0100 |
parent | 6278:fcc3ef191293 |
child | 6318:e5e7a789ef55 |
comparison
equal
deleted
inserted
replaced
6316:e144a1b67c30 | 6317:ec57067c1e0d |
---|---|
199 end | 199 end |
200 end | 200 end |
201 base_presence = base_presence or st.presence {from = occupant.nick; type = "unavailable";}; | 201 base_presence = base_presence or st.presence {from = occupant.nick; type = "unavailable";}; |
202 | 202 |
203 -- Fire event (before full_p and anon_p are created) | 203 -- Fire event (before full_p and anon_p are created) |
204 module:fire_event("muc-broadcast-presence", {room = self; stanza = base_presence; x = base_x;}); | 204 module:fire_event("muc-broadcast-presence", { |
205 room = self; stanza = base_presence; x = base_x; | |
206 occupant = occupant; is_anonymous = is_anonymous; | |
207 nick = nick; actor = actor; reason = reason; | |
208 }); | |
205 | 209 |
206 local function get_presence(is_anonymous) | 210 local function get_presence(is_anonymous) |
207 local x = st.clone(base_x); | 211 local x = st.clone(base_x); |
208 self:build_item_list(occupant, x, is_anonymous, nick, actor, reason); | 212 self:build_item_list(occupant, x, is_anonymous, nick, actor, reason); |
209 return st.clone(base_presence):add_child(x), x; | 213 return st.clone(base_presence):add_child(x), x; |