projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6081ea2
)
mod_presence: Fire a presence/initial event on initial presence
author
Kim Alvefur
<zash@zash.se>
Fri, 20 Jun 2014 14:10:04 +0000
(16:10 +0200)
committer
Kim Alvefur
<zash@zash.se>
Fri, 20 Jun 2014 14:10:04 +0000
(16:10 +0200)
plugins/mod_presence.lua
patch
|
blob
|
history
diff --git
a/plugins/mod_presence.lua
b/plugins/mod_presence.lua
index 2899bd7e97e8b7bbbe18d98bcb786b9f944d9709..32a25b598e129832a446e86c13461ed84a3515f9 100644
(file)
--- a/
plugins/mod_presence.lua
+++ b/
plugins/mod_presence.lua
@@
-137,6
+137,9
@@
function handle_normal_presence(origin, stanza)
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