From 9879d3c9426ca04263bf3c4553b885fb2cda6a5e Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 9 Jun 2019 17:48:27 -0600 Subject: [PATCH] Update config var --- app/Http/Controllers/ApiController.php | 2 +- app/Http/Controllers/FederationController.php | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/ApiController.php b/app/Http/Controllers/ApiController.php index 7f0423670..dfe48426d 100644 --- a/app/Http/Controllers/ApiController.php +++ b/app/Http/Controllers/ApiController.php @@ -40,7 +40,7 @@ class ApiController extends BaseApiController 'activitypub' => [ 'enabled' => config('federation.activitypub.enabled'), - 'remote_follow' => config('pixelfed.remote_follow_enabled') + 'remote_follow' => config('federation.activitypub.remoteFollow') ], 'ab' => [ diff --git a/app/Http/Controllers/FederationController.php b/app/Http/Controllers/FederationController.php index 6eb866b3b..5bf37aa65 100644 --- a/app/Http/Controllers/FederationController.php +++ b/app/Http/Controllers/FederationController.php @@ -51,15 +51,13 @@ class FederationController extends Controller public function remoteFollowStore(Request $request) { return; - + $this->authCheck(); $this->validate($request, [ 'url' => 'required|string', ]); - if (config('pixelfed.remote_follow_enabled') !== true) { - abort(403); - } + abort_if(!config('federation.activitypub.remoteFollow'), 403); $follower = Auth::user()->profile; $url = $request->input('url');