[mastodon-client] Correctly render remote mentions of local users

This commit is contained in:
Laura Hausmann 2023-10-11 19:09:18 +02:00
parent 73895e856c
commit f5c6cba3a6
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

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