From f5c6cba3a62e72710b370c24867722d56a55ebdf Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Wed, 11 Oct 2023 19:09:18 +0200 Subject: [PATCH] [mastodon-client] Correctly render remote mentions of local users --- packages/backend/src/server/api/mastodon/helpers/mfm.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/mastodon/helpers/mfm.ts b/packages/backend/src/server/api/mastodon/helpers/mfm.ts index 298762534..1f0cb12ca 100644 --- a/packages/backend/src/server/api/mastodon/helpers/mfm.ts +++ b/packages/backend/src/server/api/mastodon/helpers/mfm.ts @@ -122,11 +122,12 @@ export class MfmHelpers { mention(node) { const a = doc.createElement("a"); - const { username, host, acct } = node.props; + const { username, host} = node.props; const remoteUserInfo = mentionedRemoteUsers.find( (remoteUser) => remoteUser.username === username && remoteUser.host === host, ); + const acct = host === config.domain ? `@${username}` : node.props.acct; a.href = remoteUserInfo ? remoteUserInfo.url ? remoteUserInfo.url