From 524c8f07ecb2b526c002f24a803521bb7b7fce4d Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Sat, 8 Jul 2023 02:01:02 +0200 Subject: [PATCH] [mastodon-client] fix local instance mentions --- packages/megalodon/src/misskey.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/megalodon/src/misskey.ts b/packages/megalodon/src/misskey.ts index 48950f943..c7db1aad4 100644 --- a/packages/megalodon/src/misskey.ts +++ b/packages/megalodon/src/misskey.ts @@ -1281,6 +1281,8 @@ export default class Misskey implements MegalodonInterface { status.mentions = (await this.getMentions(status.plain_content!, cache)).filter(p => p != null); for (const m of status.mentions.filter((value, index, array) => array.indexOf(value) === index)) { + if (m.acct == m.username) + status.content = status.content.replace(`@${m.acct}@${this.baseUrlToHost(this.baseUrl)}`, `@${m.acct}`); status.content = status.content.replace(`@${m.acct}`, `@${m.acct}`); } return status;