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

Commit bab2ef2

Browse files
committed
Changed order of fields to match the pusher docs
1 parent 30c6635 commit bab2ef2

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/API/TriggerEvent.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ public function __invoke(Request $request)
3232
);
3333

3434
$payload = [
35-
'channel' => $channelName,
3635
'event' => $request->name,
36+
'channel' => $channelName,
3737
'data' => $request->data,
3838
];
3939

@@ -52,8 +52,8 @@ public function __invoke(Request $request)
5252
StatisticsCollector::apiMessage($request->appId);
5353

5454
DashboardLogger::log($request->appId, DashboardLogger::TYPE_API_MESSAGE, [
55-
'channel' => $channelName,
5655
'event' => $request->name,
56+
'channel' => $channelName,
5757
'payload' => $request->data,
5858
]);
5959
}

src/Dashboard/Http/Controllers/SendMessage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ public function __invoke(Request $request)
2323
'appId' => ['required', new AppId],
2424
'key' => 'required|string',
2525
'secret' => 'required|string',
26-
'channel' => 'required|string',
2726
'event' => 'required|string',
27+
'channel' => 'required|string',
2828
'data' => 'required|json',
2929
]);
3030

src/DashboardLogger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ public static function log($appId, string $type, array $details = [])
6767
$channelName = static::LOG_CHANNEL_PREFIX.$type;
6868

6969
$payload = [
70-
'channel' => $channelName,
7170
'event' => 'log-message',
71+
'channel' => $channelName,
7272
'data' => [
7373
'type' => $type,
7474
'time' => strftime('%H:%M:%S'),

src/Server/Messages/PusherClientMessage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ public function respond()
7171

7272
DashboardLogger::log($this->connection->app->id, DashboardLogger::TYPE_WS_MESSAGE, [
7373
'socketId' => $this->connection->socketId,
74-
'channel' => $this->payload->channel,
7574
'event' => $this->payload->event,
75+
'channel' => $this->payload->channel,
7676
'data' => $this->payload,
7777
]);
7878
}

0 commit comments

Comments
 (0)