From fc622bc626a573b3b63c7755e3d1ed86f5504c11 Mon Sep 17 00:00:00 2001 From: Marcel Pociot Date: Thu, 22 Nov 2018 17:42:25 +0100 Subject: [PATCH] wip --- src/LaravelEcho/WebSocket/Message.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/LaravelEcho/WebSocket/Message.php b/src/LaravelEcho/WebSocket/Message.php index dec4d09..981dc64 100644 --- a/src/LaravelEcho/WebSocket/Message.php +++ b/src/LaravelEcho/WebSocket/Message.php @@ -28,8 +28,10 @@ class Message implements RespondableMessage public function respond() { - $channel = $this->channelManager->find($this->connection->appId, $this->payload->channel); + if (starts_with($this->payload->event, 'client-')) { + $channel = $this->channelManager->find($this->connection->appId, $this->payload->channel); - optional($channel)->broadcast($this->payload); + optional($channel)->broadcast($this->payload); + } } } \ No newline at end of file