From 6b7c9f0e45f8525585ace249d3b0954437640712 Mon Sep 17 00:00:00 2001 From: Joe Dixon Date: Fri, 24 Nov 2023 09:39:33 +0000 Subject: [PATCH] wip --- src/Channels/Channel.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/Channels/Channel.php b/src/Channels/Channel.php index 82ce9712..934fc7f4 100644 --- a/src/Channels/Channel.php +++ b/src/Channels/Channel.php @@ -84,19 +84,17 @@ public function subscribed(Connection $connection): bool public function broadcast(array $payload, Connection $except = null): void { foreach ($this->connections() as $connection) { - if ($except && $except->id() === $connection->connection()->id()) { - return; - } + // if ($except && $except->id() === $connection->connection()->id()) { + // return; + // } - if (isset($payload['except']) && $payload['except'] === $connection->connection()->id()) { - return; - } + // if (isset($payload['except']) && $payload['except'] === $connection->connection()->id()) { + // return; + // } try { $connection->send( - json_encode( - Arr::except($payload, 'except') - ) + json_encode($payload, 'except') ); } catch (Exception $e) { // Output::error('Broadcasting to '.$connection->id().' resulted in an error');