Restore support for Mastodon profile short-form URLs
- Running these URLs through WebFinger first allows to retrieve the canonical ActivityPub profile URL
This commit is contained in:
parent
8640afc82e
commit
1df5003643
1 changed files with 5 additions and 2 deletions
|
@ -157,7 +157,10 @@ class APContact
|
||||||
|
|
||||||
$apcontact = [];
|
$apcontact = [];
|
||||||
|
|
||||||
$webfinger = empty(parse_url($url, PHP_URL_SCHEME));
|
// Mastodon profile short-form URL https://domain.tld/@user doesn't return AP data when queried
|
||||||
|
// with HTTPSignature::fetchRaw, but returns the correct data when provided to WebFinger
|
||||||
|
// @see https://github.com/friendica/friendica/issues/13359
|
||||||
|
$webfinger = empty(parse_url($url, PHP_URL_SCHEME)) || strpos($url, '@') !== false;
|
||||||
if ($webfinger) {
|
if ($webfinger) {
|
||||||
$apcontact = self::fetchWebfingerData($url);
|
$apcontact = self::fetchWebfingerData($url);
|
||||||
if (empty($apcontact['url'])) {
|
if (empty($apcontact['url'])) {
|
||||||
|
|
Loading…
Reference in a new issue