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
authorMatthew Wild <mwild1@gmail.com>
Fri, 25 Jul 2014 18:32:15 +0100
changeset 6317 ec57067c1e0d
parent 6316 e144a1b67c30
child 6318 e5e7a789ef55
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
plugins/muc/muc.lib.lua
--- a/plugins/muc/muc.lib.lua	Fri Jul 25 13:54:47 2014 +0100
+++ b/plugins/muc/muc.lib.lua	Fri Jul 25 18:32:15 2014 +0100
@@ -201,7 +201,11 @@
 	base_presence = base_presence or st.presence {from = occupant.nick; type = "unavailable";};
 
 	-- Fire event (before full_p and anon_p are created)
-	module:fire_event("muc-broadcast-presence", {room = self; stanza = base_presence; x = base_x;});
+	module:fire_event("muc-broadcast-presence", {
+		room = self; stanza = base_presence; x = base_x;
+		occupant = occupant; is_anonymous = is_anonymous;
+		nick = nick; actor = actor; reason = reason;
+	});
 
 	local function get_presence(is_anonymous)
 		local x = st.clone(base_x);