Changeset

13007:534c055ec378

util.session: Add 'since' property with timestamp of session creation
author Matthew Wild <mwild1@gmail.com>
date Wed, 29 Mar 2023 13:01:28 +0100
parents 13006:d943733c6d01
children 13008:7b952553bd60
files util/session.lua
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/util/session.lua	Tue Mar 28 21:25:54 2023 +0200
+++ b/util/session.lua	Wed Mar 29 13:01:28 2023 +0100
@@ -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