From 848c02d88fe8d0678bb10f5b524fe043e2b62eb7 Mon Sep 17 00:00:00 2001 From: Bilal Date: Mon, 29 Jun 2020 17:10:06 +0200 Subject: [PATCH] add log when broadcast is ignored --- app/controllers/stream_notifications_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controllers/stream_notifications_controller.rb b/app/controllers/stream_notifications_controller.rb index 7b47a94..c68fbce 100644 --- a/app/controllers/stream_notifications_controller.rb +++ b/app/controllers/stream_notifications_controller.rb @@ -65,6 +65,10 @@ class StreamNotificationsController < ApplicationController @broadcast = Broadcast.find_by(stream_uid: notification_object_id) end + if @broadcast.nil? + logger.info "Ignoring broadcast from other environment. Type = #{notification_type}. Id = #{live_stream_id} / #{notification_object_id}" + head :ok + end head :ok if @broadcast.nil? end