mirror of
https://github.com/flarum/core.git
synced 2025-07-20 08:11:27 +02: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:
@@ -45,7 +45,8 @@ class AuthController implements ControllerInterface
|
|||||||
$pusher = new Pusher(
|
$pusher = new Pusher(
|
||||||
$this->settings->get('flarum-pusher.app_key'),
|
$this->settings->get('flarum-pusher.app_key'),
|
||||||
$this->settings->get('flarum-pusher.app_secret'),
|
$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);
|
$payload = json_decode($pusher->socket_auth($userChannel, array_get($body, 'socket_id')), true);
|
||||||
|
@@ -49,7 +49,7 @@ class AddPusherApi
|
|||||||
{
|
{
|
||||||
if ($event->isSerializer(ForumSerializer::class)) {
|
if ($event->isSerializer(ForumSerializer::class)) {
|
||||||
$event->attributes['pusherKey'] = $this->settings->get('flarum-pusher.app_key');
|
$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');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user