1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-24 00:35:59 +00:00

Update SearchController, fix AP verb typo

This commit is contained in:
Daniel Supernault 2019-06-10 19:43:04 -06:00
parent 7e01f79321
commit dc8acf9210
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -38,7 +38,7 @@ class SearchController extends Controller
$tokens = [];
if(Helpers::validateUrl($tag) != false && config('federation.activitypub.enabled') == true && config('federation.activitypub.remoteFollow') == true) {
$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'];
if($type == 'Person') {
$item = Helpers::profileFirstOrNew($tag);
@ -55,7 +55,7 @@ class SearchController extends Controller
'thumb' => $item->avatarUrl()
]
]];
} else if ($type == 'Create') {
} else if ($type == 'Note') {
$item = Helpers::statusFirstOrFetch($tag, false);
$tokens['posts'] = [[
'count' => 0,