mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-08 21:30:46 +00:00
more semantically correct webfinger (use rel=self, allow type=ld+json)
This commit is contained in:
parent
9bf651e442
commit
9471fa0078
1 changed files with 3 additions and 1 deletions
|
@ -48,9 +48,11 @@ class WebfingerService
|
|||
$link = collect($webfinger['links'])
|
||||
->filter(function($link) {
|
||||
return $link &&
|
||||
isset($link['rel']) &&
|
||||
isset($link['type']) &&
|
||||
isset($link['href']) &&
|
||||
$link['type'] == 'application/activity+json';
|
||||
$link['rel'] == 'self' &&
|
||||
$link['type'] == 'application/activity+json' || $link['type'] == 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"';
|
||||
})
|
||||
->pluck('href')
|
||||
->first();
|
||||
|
|
Loading…
Reference in a new issue