mirror of
https://github.com/flarum/framework.git
synced 2025-03-22 13:05:15 +08:00
Use RequestUtil
to access actor
This commit is contained in:
parent
14c10d400e
commit
62be9088a1
@ -9,6 +9,7 @@
|
||||
|
||||
namespace Flarum\Pusher\Api\Controller;
|
||||
|
||||
use Flarum\Http\RequestUtil;
|
||||
use Flarum\Settings\SettingsRepositoryInterface;
|
||||
use Illuminate\Support\Arr;
|
||||
use Laminas\Diactoros\Response\EmptyResponse;
|
||||
@ -39,7 +40,7 @@ class AuthController implements RequestHandlerInterface
|
||||
*/
|
||||
public function handle(ServerRequestInterface $request): ResponseInterface
|
||||
{
|
||||
$userChannel = 'private-user'.$request->getAttribute('actor')->id;
|
||||
$userChannel = 'private-user'.RequestUtil::getActor($request)->id;
|
||||
$body = $request->getParsedBody();
|
||||
|
||||
if (Arr::get($body, 'channel_name') === $userChannel) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user