From 8a2f3b3e360f3e13cef4457dd84213d823c7d4c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=91=A8=E9=83=A8=E8=90=BD?= Date: Wed, 1 May 2024 11:37:55 +0800 Subject: [PATCH] fix: follow-me generate wrong link for other server --- packages/client/src/scripts/get-user-menu.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/client/src/scripts/get-user-menu.ts b/packages/client/src/scripts/get-user-menu.ts index 8f286ea8d6..110bbba56b 100644 --- a/packages/client/src/scripts/get-user-menu.ts +++ b/packages/client/src/scripts/get-user-menu.ts @@ -265,14 +265,18 @@ export function getUserMenu(user, router: Router = mainRouter) { icon: "ph-qr-code ph-bold ph-lg", text: i18n.ts.getQrCode, action: () => { - os.displayQrCode(`https://${host}/follow-me?acct=${user.username}`); + os.displayQrCode( + `https://${host}/follow-me?acct=${acct.toString(user)}`, + ); }, }, { icon: `${icon("ph-hand-waving")}`, text: i18n.ts.copyRemoteFollowUrl, action: () => { - copyToClipboard(`https://${host}/follow-me?acct=${user.username}`); + copyToClipboard( + `https://${host}/follow-me?acct=${acct.toString(user)}`, + ); os.success(); }, }, @@ -321,7 +325,7 @@ export function getUserMenu(user, router: Router = mainRouter) { icon: `${icon("ph-hand-waving")}`, text: i18n.ts.remoteFollow, action: () => { - router.push(`/follow-me?acct=${user.username}`); + router.push(`/follow-me?acct=${acct.toString(user)}`); }, } : undefined,