add more information to recording ready email

This commit is contained in:
Josh
2017-06-22 15:15:03 -04:00
parent 78a2f33f2d
commit 7e16f042a5
6 changed files with 65 additions and 2 deletions

View File

@ -263,6 +263,7 @@ class BbbController < ApplicationController
token = event['payload']['metadata'][META_TOKEN]
room_id = event['payload']['metadata']['room-id']
record_id = event['payload']['meeting_id']
duration_data = event['payload']['duration']
# the webhook event doesn't have all the data we need, so we need
# to send a getRecordings anyway
@ -271,6 +272,8 @@ class BbbController < ApplicationController
rec_info = rec_info[:recordings].first
RecordingCreatedJob.perform_later(token, room_id, parse_recording_for_view(rec_info))
rec_info[:duration] = duration_data.to_json
# send an email to the owner of this recording, if defined
if Rails.configuration.mail_notifications
owner = User.find_by(encrypted_id: room_id)