summaryrefslogtreecommitdiffstats
path: root/lib/webfinger.php
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2019-06-12 09:51:28 -0100
committerMaxence Lange <maxence@artificial-owl.com>2019-06-21 10:59:53 -0100
commitede7d0d7320b270a79e73d86116c1ff914a1a3ab (patch)
tree31c87855de2a3cf7b836e86d2e650d6257558424 /lib/webfinger.php
parent41a423138cbc90888e7d443f2efefc32dd3f6e0b (diff)
enable host-meta locally
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/webfinger.php')
-rw-r--r--lib/webfinger.php15
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',