From ce686669eb3bc712b1ababf01e294dd727543fb1 Mon Sep 17 00:00:00 2001 From: Joe Dixon Date: Fri, 17 Nov 2023 22:02:35 +0000 Subject: [PATCH] use correct id --- src/Channels/Channel.php | 4 ++-- src/ClientEvent.php | 2 +- src/Contracts/Connection.php | 2 +- src/Managers/ChannelManager.php | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Channels/Channel.php b/src/Channels/Channel.php index a247f3a6..aa9d80cb 100644 --- a/src/Channels/Channel.php +++ b/src/Channels/Channel.php @@ -51,11 +51,11 @@ public function broadcast(Application $app, array $payload, Connection $except = { collect(App::make(ChannelManager::class)->for($app)->connections($this)) ->each(function ($connection) use ($payload, $except) { - if ($except && $except->identifier() === $connection->identifier()) { + if ($except && $except->id() === $connection->id()) { return; } - if (isset($payload['except']) && $payload['except'] === $connection->identifier()) { + if (isset($payload['except']) && $payload['except'] === $connection->id()) { return; } diff --git a/src/ClientEvent.php b/src/ClientEvent.php index 52caebf5..f00f733d 100644 --- a/src/ClientEvent.php +++ b/src/ClientEvent.php @@ -33,7 +33,7 @@ public static function whisper(Connection $connection, array $payload): void { Event::dispatch( $connection->app(), - $payload + ['except' => $connection->identifier()], + $payload + ['except' => $connection->id()], $connection ); } diff --git a/src/Contracts/Connection.php b/src/Contracts/Connection.php index ff73ba5b..8ad2d19f 100644 --- a/src/Contracts/Connection.php +++ b/src/Contracts/Connection.php @@ -97,7 +97,7 @@ public function disconnect(): void App::make(ConnectionManager::class) ->for($this->app()) - ->disconnect($this->identifier()); + ->disconnect($this->id()); $this->terminate(); } diff --git a/src/Managers/ChannelManager.php b/src/Managers/ChannelManager.php index f38df82b..6b57a03b 100644 --- a/src/Managers/ChannelManager.php +++ b/src/Managers/ChannelManager.php @@ -45,7 +45,7 @@ public function app(): ?Application */ public function subscribe(Channel $channel, Connection $connection, $data = []): void { - $this->connections[$this->application->id()][$channel->name()][$connection->identifier()] = $connection; + $this->connections[$this->application->id()][$channel->name()][$connection->id()] = $connection; } /** @@ -53,7 +53,7 @@ public function subscribe(Channel $channel, Connection $connection, $data = []): */ public function unsubscribe(Channel $channel, Connection $connection): void { - unset($this->connections[$this->application->id()][$channel->name()][$connection->identifier()]); + unset($this->connections[$this->application->id()][$channel->name()][$connection->id()]); } /**