Update LiveStreamController, clear chat after stream ends

This commit is contained in:
Daniel Supernault 2022-06-26 19:37:05 -06:00
parent 020f810a7e
commit f51ffa7eab
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
2 changed files with 3 additions and 1 deletions

View File

@ -389,6 +389,8 @@ class LiveStreamController extends Controller
$stream = LiveStream::whereStreamId($name)->whereStreamKey($url['key'])->firstOrFail();
LiveStreamService::clearChat($stream->profile_id);
if(config('livestreaming.broadcast.delete_token_after_finished')) {
$stream->delete();
} else {

View File

@ -39,7 +39,7 @@ class LiveStreamService
return Redis::lrem($key, 0, $val);
}
public static function clearChat($id, $val)
public static function clearChat($id)
{
$key = self::CACHE_KEY . 'chat:' . $id;
return Redis::del($key);