From f89db42072c0268fac3d3d5cf4c5c834e96a2ced Mon Sep 17 00:00:00 2001
From: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Date: Mon, 9 Oct 2023 20:54:39 -0400
Subject: [PATCH] Fixed aliases in webfinger

---
 api/well-known/webfinger.ts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/api/well-known/webfinger.ts b/api/well-known/webfinger.ts
index 14c96aee2..8cf7bd7c5 100644
--- a/api/well-known/webfinger.ts
+++ b/api/well-known/webfinger.ts
@@ -6,15 +6,15 @@ export default function (req: VercelRequest, res: VercelResponse) {
   res.setHeader("Content-Type", `application/jrd+json`);
   const apDomain = (new URL(`${process.env.ACTIVITYPUB_URL}`)).hostname;
   let apAlias;
-  if( process.env.ACTIVITYPUB_URL_ALIAS && process.env.ACTIVITYPUB_USER_ALIAS ) {
-    apAlias = `${process.env.ACTIVITYPUB_ALIAS}`;
+  if( process.env.ACTIVITYPUB_ALIAS ) {
+    apAlias = `\"${process.env.ACTIVITYPUB_ALIAS}\"`;
   } else {
     apAlias = ""
   }
   res.end(`{
     "subject": \"acct:${process.env.ACTIVITYPUB_USER.toLowerCase()}@${apDomain}\",
     "aliases": [
-      \"${apAlias}\"
+      ${apAlias}
     ],
     "links": [
       {
-- 
GitLab