fixing private channel
This commit is contained in:
@@ -34,8 +34,7 @@ class ChatMessageSent implements ShouldBroadcast
|
||||
*/
|
||||
public function broadcastOn()
|
||||
{
|
||||
return new PrivateChannel('chat'. $this->message->channel_id);
|
||||
|
||||
return new PrivateChannel('chat.' . $this->message->channel_id);
|
||||
}
|
||||
|
||||
public function broadcastAs(): string
|
||||
|
||||
@@ -19,6 +19,6 @@ Broadcast::channel('App.Models.User.{id}', function ($user, $id) {
|
||||
return (int) $user->id === (int) $id;
|
||||
});
|
||||
|
||||
Broadcast::channel('chat{room_id}', function ($user, $room_id) {
|
||||
Broadcast::channel('chat.{room_id}', function ($user, $room_id) {
|
||||
return Auth::check();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user