aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2013-01-11 19:38:29 +0100
committerKim Alvefur <zash@zash.se>2013-01-11 19:38:29 +0100
commitc2d66ccab1f92d94cceedef5d930fafe5e55d355 (patch)
treef4818100dbbd7bd4f21b08beff3569cf0341fe3e
parent79a96e236c927803a943e2d38a2bb7ac7410d065 (diff)
downloadprosody-c2d66ccab1f92d94cceedef5d930fafe5e55d355.tar.gz
prosody-c2d66ccab1f92d94cceedef5d930fafe5e55d355.zip
mod_presence: Put a timestamp on presence we store for probes
-rw-r--r--plugins/mod_presence.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/mod_presence.lua b/plugins/mod_presence.lua
index 20d0adf0..23012750 100644
--- a/plugins/mod_presence.lua
+++ b/plugins/mod_presence.lua
@@ -18,6 +18,7 @@ local core_post_stanza = prosody.core_post_stanza;
local st = require "util.stanza";
local jid_split = require "util.jid".split;
local jid_bare = require "util.jid".bare;
+local datetime = require "util.datetime";
local hosts = hosts;
local NULL = {};
@@ -135,6 +136,7 @@ function handle_normal_presence(origin, stanza)
end
else
origin.presence = stanza;
+ stanza:tag("delay", { xmlns = "urn:xmpp:delay", from = host, stamp = datetime.datetime() }):up();
if origin.priority ~= priority then
origin.priority = priority;
recalc_resource_map(user);