Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Commit 7519da4

Browse files
committed
Force broadcastAcrossAllServers even if the channel exists locally
1 parent 7f6b8fa commit 7519da4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/API/TriggerEvent.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@ public function __invoke(Request $request)
3838
];
3939

4040
if ($channel) {
41-
$channel->broadcastToEveryoneExcept(
41+
$channel->broadcastLocallyToEveryoneExcept(
4242
(object) $payload,
4343
$request->socket_id,
4444
$request->appId
4545
);
46-
} else {
47-
$this->channelManager->broadcastAcrossServers(
48-
$request->appId, $request->socket_id, $channelName, (object) $payload
49-
);
5046
}
5147

48+
$this->channelManager->broadcastAcrossServers(
49+
$request->appId, $request->socket_id, $channelName, (object) $payload
50+
);
51+
5252
StatisticsCollector::apiMessage($request->appId);
5353

5454
DashboardLogger::log($request->appId, DashboardLogger::TYPE_API_MESSAGE, [

0 commit comments

Comments
 (0)