mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-25 17:26:43 +00:00
Update LiveStreamController
This commit is contained in:
parent
4630c5d67a
commit
473cdba855
1 changed files with 3 additions and 5 deletions
|
@ -389,11 +389,9 @@ class LiveStreamController extends Controller
|
||||||
public function clientBroadcastFinish(Request $request)
|
public function clientBroadcastFinish(Request $request)
|
||||||
{
|
{
|
||||||
abort_if(!config('livestreaming.enabled'), 400);
|
abort_if(!config('livestreaming.enabled'), 400);
|
||||||
abort_if(!$request->filled('tcurl'), 400);
|
abort_if($request->ip() != '127.0.0.1', 400);
|
||||||
$url = $this->parseStreamUrl($request->input('tcurl'));
|
$name = $request->input('name');
|
||||||
$name = $url['name'] ?? $request->input('name');
|
$stream = LiveStream::whereStreamId($name)->firstOrFail();
|
||||||
|
|
||||||
$stream = LiveStream::whereStreamId($name)->whereStreamKey($url['key'])->firstOrFail();
|
|
||||||
StreamEnd::dispatch($stream->profile_id);
|
StreamEnd::dispatch($stream->profile_id);
|
||||||
LiveStreamService::clearChat($stream->profile_id);
|
LiveStreamService::clearChat($stream->profile_id);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue