From 3ed0a6b7bedcb3cf5cac6cdaf3051185e52f2f58 Mon Sep 17 00:00:00 2001 From: Cookiezaurs Date: Thu, 7 Mar 2024 19:46:33 +0200 Subject: [PATCH] [core] Passing original(before capping) duration value to duration endpoint --- api/parts/data/usage.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/parts/data/usage.js b/api/parts/data/usage.js index 0b983fc4fbb..957f9f39fb9 100644 --- a/api/parts/data/usage.js +++ b/api/parts/data/usage.js @@ -180,6 +180,7 @@ usage.processSessionDuration = function(params, callback) { session_duration_limit = parseInt(plugins.getConfig("api", params.app && params.app.plugins, true).session_duration_limit); if (session_duration) { + var original_duration = session_duration; if (session_duration_limit && session_duration > session_duration_limit) { session_duration = session_duration_limit; } @@ -200,7 +201,8 @@ usage.processSessionDuration = function(params, callback) { if (!params.qstring.begin_session) { plugins.dispatch("/session/duration", { params: params, - session_duration: session_duration + session_duration: session_duration, + od: original_duration }); }