Support cluster setting on backend

This commit is contained in:
Toby Zerner 2017-09-13 20:43:32 +09:30
parent 64d349a5b6
commit 8de87cc5cc

View File

@ -78,10 +78,17 @@ class PushNewPosts
*/ */
protected function getPusher() protected function getPusher()
{ {
$options = [];
if ($cluster = $this->settings->get('flarum-pusher.app_cluster')) {
$options['cluster'] = $cluster;
}
return new Pusher( return 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'),
$options
); );
} }
} }