diff options
Diffstat (limited to 'lib/webfinger.php')
-rw-r--r-- | lib/webfinger.php | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/webfinger.php b/lib/webfinger.php index 432b2c0b..1d7c7d98 100644 --- a/lib/webfinger.php +++ b/lib/webfinger.php @@ -62,10 +62,15 @@ try { $fediverseService->jailed(); - if ($configService->getCloudAddress(true) !== $instance) { - throw new Exception( - 'instance is ' . $instance . ', expected ' . $configService->getCloudAddress(true) - ); + if ($configService->getSocialAddress() !== $instance) { + + if ($configService->getCloudAddress(true) === $instance) { + $instance = $configService->getSocialAddress(); + } else { + throw new Exception( + 'instance is ' . $instance . ', expected ' . $configService->getSocialAddress() + ); + } } $cacheActorService->getFromLocalAccount($username); @@ -85,7 +90,7 @@ if (substr($href, -1) === '/') { } $finger = [ - 'subject' => $subject, + 'subject' => $username . '@' . $instance, 'links' => [ [ 'rel' => 'self', |