Merge branch 'fix/follow_me_with_host' into 'develop'

fix: follow-me generate wrong link for other server

Co-authored-by: 老周部落 <laozhoubuluo@gmail.com>

See merge request firefish/firefish!10785
This commit is contained in:
naskya 2024-05-03 14:41:37 +00:00
commit f66ecd0759

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,