1
0
Fork 0

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
1 changed files with 2 additions and 2 deletions

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,