Skip to content
Snippets Groups Projects
Unverified Commit 94b5a301 authored by Samuel Couillard's avatar Samuel Couillard Committed by GitHub
Browse files

Fix Duplicate Recordings (#4930)

parent f9ee502a
No related branches found
No related tags found
No related merge requests found
......@@ -30,13 +30,15 @@ class RecordingCreator
new_name = @recording[:metadata][:name] || @recording[:name]
new_recording = Recording.find_or_create_by(room_id:,
name: new_name,
record_id: @recording[:recordID],
visibility:,
participants: @recording[:participants],
length:, protectable: @recording[:protected].present?,
recorded_at: @recording[:startTime])
new_recording = Recording.find_or_initialize_by(record_id: @recording[:recordID])
new_recording.room_id = room_id
new_recording.name = new_name
new_recording.visibility = visibility
new_recording.participants = @recording[:participants]
new_recording.length = length
new_recording.protectable = @recording[:protected].present?
new_recording.recorded_at = @recording[:startTime]
new_recording.save!
# Create format(s)
create_formats(recording: @recording, new_recording:)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment