Skip to content

Commit 92b7453

Browse files
zotanmewkakkokari-gtyih
authored andcommitted
fix: make sure outgoing remote mentions get resolved correctly if referenced with non-canonical casing (resolves misskey-dev#646)
1 parent 224bbd4 commit 92b7453

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/backend/src/core/MfmService.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ export class MfmService {
406406
mention: (node) => {
407407
const a = doc.createElement('a');
408408
const { username, host, acct } = node.props;
409-
const remoteUserInfo = mentionedRemoteUsers.find(remoteUser => remoteUser.username === username && remoteUser.host === host);
409+
const remoteUserInfo = mentionedRemoteUsers.find(remoteUser => remoteUser.username.toLowerCase() === username.toLowerCase() && remoteUser.host?.toLowerCase() === host?.toLowerCase());
410410
a.setAttribute('href', remoteUserInfo ? (remoteUserInfo.url ? remoteUserInfo.url : remoteUserInfo.uri) : `${this.config.url}/${acct}`);
411411
a.className = 'u-url mention';
412412
a.textContent = acct;

0 commit comments

Comments
 (0)