aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2023-03-29 13:01:28 +0100
committerMatthew Wild <mwild1@gmail.com>2023-03-29 13:01:28 +0100
commit75bf9e6eff64fb15f8aea3d423751b5600ba9ca8 (patch)
tree698c45cc977052595a8467f8d4c889ad2802a0a5
parent124b4fa3026401f75738734edd174bd90d66bf7c (diff)
downloadprosody-75bf9e6eff64fb15f8aea3d423751b5600ba9ca8.tar.gz
prosody-75bf9e6eff64fb15f8aea3d423751b5600ba9ca8.zip
util.session: Add 'since' property with timestamp of session creation
-rw-r--r--util/session.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/util/session.lua b/util/session.lua
index c5925910..1d03fa54 100644
--- a/util/session.lua
+++ b/util/session.lua
@@ -1,10 +1,12 @@
local initialize_filters = require "prosody.util.filters".initialize;
+local time = require "util.time";
local logger = require "prosody.util.logger";
local function new_session(typ)
local session = {
type = typ .. "_unauthed";
base_type = typ;
+ since = time.now();
};
return session;
end