Skip to content

Commit

Permalink
Merge pull request #4966 from Cookiezaurs/master-user-merging
Browse files Browse the repository at this point in the history
[core] Passing original(before capping) duration value to duration endpoint
  • Loading branch information
Cookiezaurs authored Mar 7, 2024
2 parents 13bddf5 + 3ed0a6b commit cf59fd9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/parts/data/usage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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
});
}

Expand Down

0 comments on commit cf59fd9

Please sign in to comment.