forked from mirror/pixelfed
Update SearchController, fix AP verb typo
This commit is contained in:
parent
7e01f79321
commit
dc8acf9210
|
@ -38,7 +38,7 @@ class SearchController extends Controller
|
||||||
$tokens = [];
|
$tokens = [];
|
||||||
if(Helpers::validateUrl($tag) != false && config('federation.activitypub.enabled') == true && config('federation.activitypub.remoteFollow') == 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'], ['Note', 'Person']) == true) {
|
||||||
$type = $remote['type'];
|
$type = $remote['type'];
|
||||||
if($type == 'Person') {
|
if($type == 'Person') {
|
||||||
$item = Helpers::profileFirstOrNew($tag);
|
$item = Helpers::profileFirstOrNew($tag);
|
||||||
|
@ -55,7 +55,7 @@ class SearchController extends Controller
|
||||||
'thumb' => $item->avatarUrl()
|
'thumb' => $item->avatarUrl()
|
||||||
]
|
]
|
||||||
]];
|
]];
|
||||||
} else if ($type == 'Create') {
|
} else if ($type == 'Note') {
|
||||||
$item = Helpers::statusFirstOrFetch($tag, false);
|
$item = Helpers::statusFirstOrFetch($tag, false);
|
||||||
$tokens['posts'] = [[
|
$tokens['posts'] = [[
|
||||||
'count' => 0,
|
'count' => 0,
|
||||||
|
|
Loading…
Reference in New Issue