Skip to content

Commit

Permalink
Update EventDispatcher.php
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell authored Dec 6, 2024
1 parent c514d7f commit 228ca7c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Protocols/Pusher/EventDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ public static function dispatch(Application $app, array $payload, ?Connection $c
'application' => serialize($app),
'payload' => $payload,
];

if ($connection?->id() !== null) {
$data['socket_id'] = $connection?->id();
}

app(PubSubProvider::class)->publish($data);
}

Expand Down

0 comments on commit 228ca7c

Please sign in to comment.