[backend] Ignore capitalization for remoteuserinfo in mfm-to-html

This commit is contained in:
Laura Hausmann 2023-10-13 02:13:34 +02:00
parent bab61d2a32
commit ef14e0221b
Signed by: zotan
GPG key ID: D044E84C5BE01605
2 changed files with 2 additions and 2 deletions

View file

@ -119,7 +119,7 @@ export function toHtml(
const { username, host, acct } = node.props;
const remoteUserInfo = mentionedRemoteUsers.find(
(remoteUser) =>
remoteUser.username === username && remoteUser.host === host,
remoteUser.username.toLowerCase() === username.toLowerCase() && remoteUser.host === host,
);
a.href = remoteUserInfo
? remoteUserInfo.url

View file

@ -140,7 +140,7 @@ export class MfmHelpers {
const { username, host} = node.props;
const remoteUserInfo = mentionedRemoteUsers.find(
(remoteUser) =>
remoteUser.username === username && remoteUser.host === host,
remoteUser.username.toLowerCase() === username.toLowerCase() && remoteUser.host === host,
);
const localpart = `@${username}`;
const isLocal = host === config.domain || (host == null && objectHost == null);