Skip to content

Commit 8a9aefc

Browse files
authored
Merge pull request #291 from rifrocket/rifrocket-patch-1
support beyondcode/laravel-websockets
2 parents 7ae634e + 02f2933 commit 8a9aefc

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

src/assets/js/code.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,13 @@ const setMessengerId = (id) => $("meta[name=id]").attr("content", id);
3232
*/
3333
Pusher.logToConsole = chatify.pusher.debug;
3434
const pusher = new Pusher(chatify.pusher.key, {
35-
encrypted: chatify.pusher.options.encrypted,
36-
cluster: chatify.pusher.options.cluster,
37-
authEndpoint: chatify.pusherAuthEndpoint,
35+
encrypted: chatify.pusher.options.encrypted,
36+
cluster: chatify.pusher.options.cluster,
37+
wsHost: chatify.pusher.options.host,
38+
wsPort: chatify.pusher.options.port,
39+
wssPort: chatify.pusher.options.port,
40+
forceTLS: chatify.pusher.options.useTLS,
41+
authEndpoint: chatify.pusherAuthEndpoint,
3842
auth: {
3943
headers: {
4044
"X-CSRF-TOKEN": csrfToken,

src/config/chatify.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,12 @@
4343
'secret' => env('PUSHER_APP_SECRET'),
4444
'app_id' => env('PUSHER_APP_ID'),
4545
'options' => [
46-
'cluster' => env('PUSHER_APP_CLUSTER'),
46+
'cluster' => env('PUSHER_APP_CLUSTER', 'mt1'),
47+
'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com',
48+
'port' => env('PUSHER_PORT', 443),
49+
'scheme' => env('PUSHER_SCHEME', 'https'),
4750
'encrypted' => true,
51+
'useTLS' => env('PUSHER_SCHEME', 'https') === 'https',
4852
],
4953
],
5054

0 commit comments

Comments
 (0)