Update livestream events

This commit is contained in:
Daniel Supernault 2022-06-27 21:52:07 -06:00
parent aa57e1e593
commit 4bd9e12f00
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
10 changed files with 8 additions and 8 deletions

View file

@ -36,7 +36,7 @@ class BanUser implements ShouldBroadcast
*/
public function broadcastOn()
{
return new PrivateChannel('live.chat.' . $this->livestream->profile_id);
return new Channel('live.chat.' . $this->livestream->profile_id);
}
public function broadcastAs()

View file

@ -36,7 +36,7 @@ class DeleteChatComment implements ShouldBroadcast
*/
public function broadcastOn()
{
return new PrivateChannel('live.chat.' . $this->livestream->profile_id);
return new Channel('live.chat.' . $this->livestream->profile_id);
}
public function broadcastAs()

View file

@ -36,7 +36,7 @@ class NewChatComment implements ShouldBroadcast
*/
public function broadcastOn()
{
return new PrivateChannel('live.chat.' . $this->livestream->profile_id);
return new Channel('live.chat.' . $this->livestream->profile_id);
}
public function broadcastAs()

View file

@ -36,7 +36,7 @@ class PinChatMessage implements ShouldBroadcast
*/
public function broadcastOn()
{
return new PrivateChannel('live.chat.' . $this->livestream->profile_id);
return new Channel('live.chat.' . $this->livestream->profile_id);
}
public function broadcastAs()

View file

@ -33,7 +33,7 @@ class StreamEnd implements ShouldBroadcast
*/
public function broadcastOn()
{
return new PrivateChannel('live.chat.' . $this->id);
return new Channel('live.chat.' . $this->id);
}
public function broadcastAs()

View file

@ -33,7 +33,7 @@ class StreamStart implements ShouldBroadcast
*/
public function broadcastOn()
{
return new PrivateChannel('live.chat.' . $this->id);
return new Channel('live.chat.' . $this->id);
}
public function broadcastAs()

View file

@ -36,7 +36,7 @@ class UnpinChatMessage implements ShouldBroadcast
*/
public function broadcastOn()
{
return new PrivateChannel('live.chat.' . $this->livestream->profile_id);
return new Channel('live.chat.' . $this->livestream->profile_id);
}
public function broadcastAs()

View file

@ -268,7 +268,7 @@ class LiveStreamController extends Controller
$stream = LiveStream::whereProfileId($pid)->firstOrFail();
$payload = $request->input('message');
broadcast(new DeleteChatComment($stream, $payload))->toOthers();
DeleteChatComment::dispatch($stream, $payload);
$payload = json_encode($payload, JSON_UNESCAPED_SLASHES);
LiveStreamService::deleteComment($stream->profile_id, $payload);
return;

Binary file not shown.

Binary file not shown.