Skip to content

Commit

Permalink
use correct id
Browse files Browse the repository at this point in the history
  • Loading branch information
joedixon committed Nov 17, 2023
1 parent 074fde9 commit ce68666
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Channels/Channel.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion src/ClientEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Contracts/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function disconnect(): void

App::make(ConnectionManager::class)
->for($this->app())
->disconnect($this->identifier());
->disconnect($this->id());

$this->terminate();
}
Expand Down
4 changes: 2 additions & 2 deletions src/Managers/ChannelManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ 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;
}

/**
* Unsubscribe from a channel.
*/
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()]);
}

/**
Expand Down

0 comments on commit ce68666

Please sign in to comment.