mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-21 13:35:12 +00:00
fix: make sure outgoing remote mentions get resolved correctly if referenced with non-canonical casing (resolves #646)
This commit is contained in:
parent
60be692a0a
commit
724aff6e4e
1 changed files with 1 additions and 1 deletions
|
@ -412,7 +412,7 @@ export class MfmService {
|
|||
mention: (node) => {
|
||||
const a = doc.createElement('a');
|
||||
const { username, host, acct } = node.props;
|
||||
const remoteUserInfo = mentionedRemoteUsers.find(remoteUser => remoteUser.username === username && remoteUser.host === host);
|
||||
const remoteUserInfo = mentionedRemoteUsers.find(remoteUser => remoteUser.username.toLowerCase() === username.toLowerCase() && remoteUser.host?.toLowerCase() === host?.toLowerCase());
|
||||
a.setAttribute('href', remoteUserInfo ? (remoteUserInfo.url ? remoteUserInfo.url : remoteUserInfo.uri) : `${this.config.url}/${acct}`);
|
||||
a.className = 'u-url mention';
|
||||
a.textContent = acct;
|
||||
|
|
Loading…
Reference in a new issue