diff --git a/src/utils/handle-content-links.js b/src/utils/handle-content-links.js index 9637f211..be6547fb 100644 --- a/src/utils/handle-content-links.js +++ b/src/utils/handle-content-links.js @@ -24,12 +24,14 @@ function handleContentLinks(opts) { ).innerText.trim(); const username = targetText.replace(/^@/, ''); const url = target.getAttribute('href'); - const mention = mentions.find( - (mention) => - mention.username === username || - mention.acct === username || - mention.url === url, - ); + // Only fallback to acct/username check if url doesn't match + const mention = + mentions.find((mention) => mention.url === url) || + mentions.find( + (mention) => + mention.acct === username || mention.username === username, + ); + console.warn('MENTION', mention, url); if (mention) { e.preventDefault(); e.stopPropagation();