mirror of
https://github.com/bjc/prosody.git
synced 2025-04-04 13:47:41 +03:00
mod_presence: Put a timestamp on presence we store for probes
This commit is contained in:
parent
79a96e236c
commit
c2d66ccab1
1 changed files with 2 additions and 0 deletions
|
@ -18,6 +18,7 @@ local core_post_stanza = prosody.core_post_stanza;
|
||||||
local st = require "util.stanza";
|
local st = require "util.stanza";
|
||||||
local jid_split = require "util.jid".split;
|
local jid_split = require "util.jid".split;
|
||||||
local jid_bare = require "util.jid".bare;
|
local jid_bare = require "util.jid".bare;
|
||||||
|
local datetime = require "util.datetime";
|
||||||
local hosts = hosts;
|
local hosts = hosts;
|
||||||
local NULL = {};
|
local NULL = {};
|
||||||
|
|
||||||
|
@ -135,6 +136,7 @@ function handle_normal_presence(origin, stanza)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
origin.presence = stanza;
|
origin.presence = stanza;
|
||||||
|
stanza:tag("delay", { xmlns = "urn:xmpp:delay", from = host, stamp = datetime.datetime() }):up();
|
||||||
if origin.priority ~= priority then
|
if origin.priority ~= priority then
|
||||||
origin.priority = priority;
|
origin.priority = priority;
|
||||||
recalc_resource_map(user);
|
recalc_resource_map(user);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue