From 49f7378461e3d3a667490088363a93f44351666a Mon Sep 17 00:00:00 2001 From: Joe Dixon Date: Thu, 23 Nov 2023 10:38:48 +0000 Subject: [PATCH] wip --- src/Contracts/Connection.php | 4 ++-- src/Pusher/Event.php | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/Contracts/Connection.php b/src/Contracts/Connection.php index 5123c3e6..502dc6be 100644 --- a/src/Contracts/Connection.php +++ b/src/Contracts/Connection.php @@ -27,7 +27,7 @@ public function __construct( protected ?string $origin ) { $this->lastSeenAt = time(); - $this->pusher = new PusherEvent; + // $this->pusher = new PusherEvent; } /** @@ -73,7 +73,7 @@ public function ping(): void { $this->hasBeenPinged = true; - $this->pusher->ping($this); + // $this->pusher->ping($this); // Output::info('Connection Pinged', $this->id()); } diff --git a/src/Pusher/Event.php b/src/Pusher/Event.php index be866cd9..ea69d71b 100644 --- a/src/Pusher/Event.php +++ b/src/Pusher/Event.php @@ -9,6 +9,11 @@ class Event { + public function __construct(protected ChannelManager $channels) + { + // + } + /** * Handle a pusher event. */ @@ -45,7 +50,7 @@ public function acknowledge(Connection $connection): void */ public function subscribe(Connection $connection, string $channel, string $auth = null, string $data = null): void { - $channel = app(ChannelManager::class) + $channel = $this->channels ->for($connection->app()) ->find($channel); @@ -59,7 +64,7 @@ public function subscribe(Connection $connection, string $channel, string $auth */ public function unsubscribe(Connection $connection, string $channel): void { - $channel = app(ChannelManager::class) + $channel = $this->channels ->for($connection->app()) ->find($channel) ->unsubscribe($connection);