Skip to content

Commit

Permalink
Merge pull request #291 from rifrocket/rifrocket-patch-1
Browse files Browse the repository at this point in the history
support beyondcode/laravel-websockets
  • Loading branch information
munafio authored Jul 13, 2023
2 parents 7ae634e + 02f2933 commit 8a9aefc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
10 changes: 7 additions & 3 deletions src/assets/js/code.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,13 @@ const setMessengerId = (id) => $("meta[name=id]").attr("content", id);
*/
Pusher.logToConsole = chatify.pusher.debug;
const pusher = new Pusher(chatify.pusher.key, {
encrypted: chatify.pusher.options.encrypted,
cluster: chatify.pusher.options.cluster,
authEndpoint: chatify.pusherAuthEndpoint,
encrypted: chatify.pusher.options.encrypted,
cluster: chatify.pusher.options.cluster,
wsHost: chatify.pusher.options.host,
wsPort: chatify.pusher.options.port,
wssPort: chatify.pusher.options.port,
forceTLS: chatify.pusher.options.useTLS,
authEndpoint: chatify.pusherAuthEndpoint,
auth: {
headers: {
"X-CSRF-TOKEN": csrfToken,
Expand Down
6 changes: 5 additions & 1 deletion src/config/chatify.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,12 @@
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'cluster' => env('PUSHER_APP_CLUSTER', 'mt1'),
'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com',
'port' => env('PUSHER_PORT', 443),
'scheme' => env('PUSHER_SCHEME', 'https'),
'encrypted' => true,
'useTLS' => env('PUSHER_SCHEME', 'https') === 'https',
],
],

Expand Down

0 comments on commit 8a9aefc

Please sign in to comment.