Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: wrong duration when user has multiple sessions with same internal id #1

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
bbbevents (1.5.0)
bbbevents (1.5.1)
nokogiri

GEM
Expand Down
8 changes: 7 additions & 1 deletion lib/bbbevents/recording.rb
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,13 @@ def fill_missing_left_events(combined_tuples)
unless joins_lefts_arr_sorted_length == i
# Take the next event as the left event for this current event
next_event = joins_lefts_arr_sorted[i + 1]
left_event = {:timestamp => next_event[:timestamp], :userid => cur_event[:userid], :event => :left}

# only match if it's the same userId
if cur_event[:join][:userid] == next_event[:join][:userid]
left_event = {:timestamp => next_event[:join][:timestamp], :userid => cur_event[:join][:userid] , :event => :left}
else
left_event = {:timestamp => @finish, :userid => cur_event[:join][:userid], :event => :left}
end

cur_event[:left] = left_event
end
Expand Down
2 changes: 1 addition & 1 deletion lib/bbbevents/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module BBBEvents
VERSION = "1.5.0"
VERSION = "1.5.1"
end
Loading