plugins/mod_presence.lua
changeset 6281 8dc01fa767e0
parent 5776 bd0ff8ae98a8
child 6291 7a604381d6fc
--- a/plugins/mod_presence.lua	Wed May 28 12:43:34 2014 +0100
+++ b/plugins/mod_presence.lua	Fri Jun 20 16:10:04 2014 +0200
@@ -137,6 +137,9 @@
 			origin.directed = nil;
 		end
 	else
+		if not origin.presence then
+			module:fire_event("presence/initial", { origin = origin, stanza = stanza } );
+		end
 		origin.presence = stanza;
 		stanza:tag("delay", { xmlns = "urn:xmpp:delay", from = host, stamp = datetime.datetime() }):up();
 		if origin.priority ~= priority then