From 2ea6e0a57977682cc8e7b21bd8f818a790f9d534 Mon Sep 17 00:00:00 2001 From: Mar0xy Date: Mon, 25 Sep 2023 13:06:07 +0200 Subject: [PATCH] fix: resolve host variable on userDetail --- packages/megalodon/src/misskey/api_client.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/megalodon/src/misskey/api_client.ts b/packages/megalodon/src/misskey/api_client.ts index 6088e3072..3726f0a5a 100644 --- a/packages/megalodon/src/misskey/api_client.ts +++ b/packages/megalodon/src/misskey/api_client.ts @@ -107,6 +107,7 @@ namespace MisskeyAPI { export const userDetail = (u: Entity.UserDetail, host: string | null = null): MegalodonEntity.Account => { let acct = u.username; + host ? host = host.replace("https://", "") : undefined; let acctUrl = `https://${u.host || host}/@${u.username}`; if (u.host) { acct = `${u.username}@${u.host}`;