We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Right now the WebFinger lookup implementation assumes that "rel": "self" is in position 0 of the array links:
"rel": "self"
0
links
$profile = Helpers::profileFetch($webfinger['links'][0]['href']); https://github.com/pixelfed/pixelfed/blob/dev/app/Services/WebfingerService.php
$profile = Helpers::profileFetch($webfinger['links'][0]['href']);
if(isset($json['links']['href'])) { $href = $json['links']['href']; } else { $href = $json['links'][0]['href']; }
https://github.com/pixelfed/pixelfed/blob/dev/app/Services/NodeinfoService.php
This might lead to incompatibilities with other implementations.
I found this (sadly I forgot where 🙄) to be a better way:
$found_url = ""; foreach ($data['links'] as $link) { if (isset($link['rel'], $link['type'], $link['href'])) { if ($link['rel'] == 'self' && $link['type'] == 'application/activity+json' ) { $found_url = $link['href']; } } }
The text was updated successfully, but these errors were encountered:
aff7456
happy to help 😄
Sorry, something went wrong.
No branches or pull requests
Right now the WebFinger lookup implementation assumes that
"rel": "self"
is in position0
of the arraylinks
:$profile = Helpers::profileFetch($webfinger['links'][0]['href']);
https://github.com/pixelfed/pixelfed/blob/dev/app/Services/WebfingerService.php
https://github.com/pixelfed/pixelfed/blob/dev/app/Services/NodeinfoService.php
This might lead to incompatibilities with other implementations.
I found this (sadly I forgot where 🙄) to be a better way:
The text was updated successfully, but these errors were encountered: