Browse Source

Update livestream events

Daniel Supernault 3 years ago
parent
commit
4bd9e12f00

+ 1 - 1
app/Events/LiveStream/BanUser.php

@@ -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()

+ 1 - 1
app/Events/LiveStream/DeleteChatComment.php

@@ -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()

+ 1 - 1
app/Events/LiveStream/NewChatComment.php

@@ -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()

+ 1 - 1
app/Events/LiveStream/PinChatMessage.php

@@ -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()

+ 1 - 1
app/Events/LiveStream/StreamEnd.php

@@ -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()

+ 1 - 1
app/Events/LiveStream/StreamStart.php

@@ -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()

+ 1 - 1
app/Events/LiveStream/UnpinChatMessage.php

@@ -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()

+ 1 - 1
app/Http/Controllers/LiveStreamController.php

@@ -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;

BIN
public/js/live-player.js


BIN
public/mix-manifest.json