Software /
code /
prosody
Changeset
6281:8dc01fa767e0
mod_presence: Fire a presence/initial event on initial presence
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 20 Jun 2014 16:10:04 +0200 |
parents | 6260:6986ca575568 |
children | 6282:bce801e40484 |
files | plugins/mod_presence.lua |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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