diff options
author | Matthew Wild <mwild1@gmail.com> | 2023-03-29 13:01:28 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2023-03-29 13:01:28 +0100 |
commit | 75bf9e6eff64fb15f8aea3d423751b5600ba9ca8 (patch) | |
tree | 698c45cc977052595a8467f8d4c889ad2802a0a5 | |
parent | 124b4fa3026401f75738734edd174bd90d66bf7c (diff) | |
download | prosody-75bf9e6eff64fb15f8aea3d423751b5600ba9ca8.tar.gz prosody-75bf9e6eff64fb15f8aea3d423751b5600ba9ca8.zip |
util.session: Add 'since' property with timestamp of session creation
-rw-r--r-- | util/session.lua | 2 |
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 |