diff --git a/extensions/pusher/bootstrap.php b/extensions/pusher/bootstrap.php index 5579f807e..5fe44849c 100644 --- a/extensions/pusher/bootstrap.php +++ b/extensions/pusher/bootstrap.php @@ -16,4 +16,4 @@ return function (Dispatcher $events) { $events->subscribe(Listener\AddClientAssets::class); $events->subscribe(Listener\AddPusherApi::class); $events->subscribe(Listener\PushNewPosts::class); -}; \ No newline at end of file +}; diff --git a/extensions/pusher/src/Api/Controller/AuthController.php b/extensions/pusher/src/Api/Controller/AuthController.php index 0900288fa..1ff53847f 100644 --- a/extensions/pusher/src/Api/Controller/AuthController.php +++ b/extensions/pusher/src/Api/Controller/AuthController.php @@ -38,7 +38,7 @@ class AuthController implements ControllerInterface */ public function handle(ServerRequestInterface $request) { - $userChannel = 'private-user' . $request->getAttribute('actor')->id; + $userChannel = 'private-user'.$request->getAttribute('actor')->id; $body = $request->getParsedBody(); if (array_get($body, 'channel_name') === $userChannel) { diff --git a/extensions/pusher/src/Listener/AddClientAssets.php b/extensions/pusher/src/Listener/AddClientAssets.php index 8666b3c7f..29a71f4e9 100644 --- a/extensions/pusher/src/Listener/AddClientAssets.php +++ b/extensions/pusher/src/Listener/AddClientAssets.php @@ -1,4 +1,5 @@ -isAdmin()) { $event->addAssets([ - __DIR__ . '/../../js/admin/dist/extension.js' + __DIR__.'/../../js/admin/dist/extension.js' ]); $event->addBootstrapper('flarum/pusher/main'); } diff --git a/extensions/pusher/src/Listener/AddPusherApi.php b/extensions/pusher/src/Listener/AddPusherApi.php index 942396acd..0106b0f94 100755 --- a/extensions/pusher/src/Listener/AddPusherApi.php +++ b/extensions/pusher/src/Listener/AddPusherApi.php @@ -1,4 +1,5 @@ -users as $user) { if ($user->shouldAlert($blueprint::getType())) { - $pusher->trigger('private-user' . $user->id, 'notification', null); + $pusher->trigger('private-user'.$user->id, 'notification', null); } } }