Update LiveStreamController, fix visibility condition

This commit is contained in:
Daniel Supernault 2022-06-26 19:53:36 -06:00
parent f8e585c49a
commit 6bf68c147e
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -130,7 +130,7 @@ class LiveStreamController extends Controller
->whereNotNull('live_at')
->first();
abort_if(!$request->user() && $stream->visibility !== 'public', 404);
abort_if(!$request->user() && $stream && $stream->visibility !== 'public', 404);
return view('live.player', compact('id'));
}