mirror of
https://github.com/flarum/framework.git
synced 2024-11-26 02:10:09 +08:00
Fixes to cluster setting
- Use the cluster setting when connecting to Pusher from the server-side - Remove incorrect default value for the setting as it is serialized
This commit is contained in:
parent
159847fec0
commit
a51f94deda
|
@ -45,7 +45,8 @@ class AuthController implements ControllerInterface
|
|||
$pusher = new Pusher(
|
||||
$this->settings->get('flarum-pusher.app_key'),
|
||||
$this->settings->get('flarum-pusher.app_secret'),
|
||||
$this->settings->get('flarum-pusher.app_id')
|
||||
$this->settings->get('flarum-pusher.app_id'),
|
||||
['cluster' => $this->settings->get('flarum-pusher.app_cluster')]
|
||||
);
|
||||
|
||||
$payload = json_decode($pusher->socket_auth($userChannel, array_get($body, 'socket_id')), true);
|
||||
|
|
|
@ -49,7 +49,7 @@ class AddPusherApi
|
|||
{
|
||||
if ($event->isSerializer(ForumSerializer::class)) {
|
||||
$event->attributes['pusherKey'] = $this->settings->get('flarum-pusher.app_key');
|
||||
$event->attributes['pusherCluster'] = $this->settings->get('flarum-pusher.app_cluster', 'us');
|
||||
$event->attributes['pusherCluster'] = $this->settings->get('flarum-pusher.app_cluster');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user