[mastodon-client] Only display localpart for mentions in mfm-to-html

This commit is contained in:
Laura Hausmann 2023-10-11 19:15:56 +02:00
parent f5c6cba3a6
commit 1fdea9866a
No known key found for this signature in database
GPG Key ID: D044E84C5BE01605

View File

@ -127,14 +127,15 @@ export class MfmHelpers {
(remoteUser) =>
remoteUser.username === username && remoteUser.host === host,
);
const acct = host === config.domain ? `@${username}` : node.props.acct;
const localpart = `@${username}`;
const acct = host === config.domain ? localpart: node.props.acct;
a.href = remoteUserInfo
? remoteUserInfo.url
? remoteUserInfo.url
: remoteUserInfo.uri
: `${config.url}/${acct}`;
a.className = "u-url mention";
a.textContent = acct;
a.textContent = localpart;
return a;
},