mirror of
https://github.com/flarum/framework.git
synced 2024-11-26 02:10:09 +08:00
Applied fixes from StyleCI
This commit is contained in:
parent
8dcb680576
commit
478450b2ea
|
@ -16,4 +16,4 @@ return function (Dispatcher $events) {
|
||||||
$events->subscribe(Listener\AddClientAssets::class);
|
$events->subscribe(Listener\AddClientAssets::class);
|
||||||
$events->subscribe(Listener\AddPusherApi::class);
|
$events->subscribe(Listener\AddPusherApi::class);
|
||||||
$events->subscribe(Listener\PushNewPosts::class);
|
$events->subscribe(Listener\PushNewPosts::class);
|
||||||
};
|
};
|
||||||
|
|
|
@ -38,7 +38,7 @@ class AuthController implements ControllerInterface
|
||||||
*/
|
*/
|
||||||
public function handle(ServerRequestInterface $request)
|
public function handle(ServerRequestInterface $request)
|
||||||
{
|
{
|
||||||
$userChannel = 'private-user' . $request->getAttribute('actor')->id;
|
$userChannel = 'private-user'.$request->getAttribute('actor')->id;
|
||||||
$body = $request->getParsedBody();
|
$body = $request->getParsedBody();
|
||||||
|
|
||||||
if (array_get($body, 'channel_name') === $userChannel) {
|
if (array_get($body, 'channel_name') === $userChannel) {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of Flarum.
|
* This file is part of Flarum.
|
||||||
*
|
*
|
||||||
|
@ -38,7 +39,7 @@ class AddClientAssets
|
||||||
|
|
||||||
if ($event->isAdmin()) {
|
if ($event->isAdmin()) {
|
||||||
$event->addAssets([
|
$event->addAssets([
|
||||||
__DIR__ . '/../../js/admin/dist/extension.js'
|
__DIR__.'/../../js/admin/dist/extension.js'
|
||||||
]);
|
]);
|
||||||
$event->addBootstrapper('flarum/pusher/main');
|
$event->addBootstrapper('flarum/pusher/main');
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of Flarum.
|
* This file is part of Flarum.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of Flarum.
|
* This file is part of Flarum.
|
||||||
*
|
*
|
||||||
|
@ -67,7 +68,7 @@ class PushNewPosts
|
||||||
|
|
||||||
foreach ($event->users as $user) {
|
foreach ($event->users as $user) {
|
||||||
if ($user->shouldAlert($blueprint::getType())) {
|
if ($user->shouldAlert($blueprint::getType())) {
|
||||||
$pusher->trigger('private-user' . $user->id, 'notification', null);
|
$pusher->trigger('private-user'.$user->id, 'notification', null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user