fix: follow-me generate wrong link for other server

This commit is contained in:
老周部落 2024-05-01 11:37:55 +08:00
parent c0c5cb92cd
commit 8a2f3b3e36
No known key found for this signature in database
GPG key ID: C72181CD85C6B738

View file

@ -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,