forked from mirror/pixelfed
Update SearchController
This commit is contained in:
parent
d7e6350f9f
commit
1c9e823cad
|
@ -36,7 +36,7 @@ class SearchController extends Controller
|
||||||
$hash = hash('sha256', $tag);
|
$hash = hash('sha256', $tag);
|
||||||
$tokens = Cache::remember('api:search:tag:'.$hash, now()->addMinutes(5), function () use ($tag) {
|
$tokens = Cache::remember('api:search:tag:'.$hash, now()->addMinutes(5), function () use ($tag) {
|
||||||
$tokens = [];
|
$tokens = [];
|
||||||
if(Helpers::validateUrl($tag) != false && config('pixelfed.activitypub_enabled') == true && config('pixelfed.remote_follow_enabled') == true) {
|
if(Helpers::validateUrl($tag) != false && config('federation.activitypub.enabled') == true && config('federation.activitypub.remoteFollow') == true) {
|
||||||
$remote = Helpers::fetchFromUrl($tag);
|
$remote = Helpers::fetchFromUrl($tag);
|
||||||
if(isset($remote['type']) && in_array($remote['type'], ['Create', 'Person']) == true) {
|
if(isset($remote['type']) && in_array($remote['type'], ['Create', 'Person']) == true) {
|
||||||
$type = $remote['type'];
|
$type = $remote['type'];
|
||||||
|
|
Loading…
Reference in New Issue