Changeset

5297:7453245f16e7

mod_presence: Put a timestamp on presence we store for probes
author Kim Alvefur <zash@zash.se>
date Fri, 11 Jan 2013 19:38:29 +0100
parents 5296:78b7a4ad2f32
children 5298:6d34ed9fce69
files plugins/mod_presence.lua
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_presence.lua	Wed Jan 09 22:01:52 2013 +0100
+++ b/plugins/mod_presence.lua	Fri Jan 11 19:38:29 2013 +0100
@@ -18,6 +18,7 @@
 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 @@
 		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);