add notice when matching is completed

This commit is contained in:
Bilal
2020-09-15 16:15:51 +03:00
parent 28e0eb36b7
commit fb32746c81
8 changed files with 55 additions and 4 deletions

View File

@@ -33,4 +33,15 @@ class ProjectsChannel < ApplicationCable::Channel
content = ApplicationController.render partial: 'application/flash', locals: { flash: flash }
broadcast_to project, event: :conference_recording_ready, content: content
end
def self.appearance_matching_flash_message(project, message, flash_type = :notice)
if (flash_type == :notice)
flash = OpenStruct.new notice: message
else
flash = OpenStruct.new alert: message
end
content = ApplicationController.render partial: 'application/flash', locals: { flash: flash }
broadcast_to project, event: :appearance_matching_flash_message, content: content
end
end