Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Commit fc622bc

Browse files
committed
wip
1 parent 2230997 commit fc622bc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/LaravelEcho/WebSocket/Message.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ public function __construct(stdClass $payload, ConnectionInterface $connection,
2828

2929
public function respond()
3030
{
31-
$channel = $this->channelManager->find($this->connection->appId, $this->payload->channel);
31+
if (starts_with($this->payload->event, 'client-')) {
32+
$channel = $this->channelManager->find($this->connection->appId, $this->payload->channel);
3233

33-
optional($channel)->broadcast($this->payload);
34+
optional($channel)->broadcast($this->payload);
35+
}
3436
}
3537
}

0 commit comments

Comments
 (0)