mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Update LiveStreamController, clear chat after stream ends
This commit is contained in:
parent
020f810a7e
commit
f51ffa7eab
2 changed files with 3 additions and 1 deletions
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue