diff --git a/CHANGELOG.md b/CHANGELOG.md index b986273d0d6fca12339190d7d982eeeafaaa3d89..76abe42e10a8db4114d676251fff1146c91d0208 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,8 @@ (Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/706) - Fix: 連åˆã¸ã®é…信時ã«ã€acctã®å¤§å°æ–‡å—ãŒåŒºåˆ¥ã•ã‚Œã¦ã—ã¾ã„æ£ã—ãメンションãŒå‡¦ç†ã•ã‚Œãªã„ã“ã¨ãŒã‚ã‚‹å•é¡Œã‚’ä¿®æ£ (Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/711) +- Fix: ãƒãƒ¼ã‚«ãƒ«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¸ã®ãƒ¡ãƒ³ã‚·ãƒ§ãƒ³ã‚’å«ã‚€ãƒŽãƒ¼ãƒˆãŒé€£åˆã•ã‚Œã‚‹éš›ã«æ£ã—ã„URLã«å¤‰æ›ã•ã‚Œãªã„ã“ã¨ãŒã‚ã‚‹å•é¡Œã‚’ä¿®æ£ + (Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/712) - Fix: FTT無効時ã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒªã‚¹ãƒˆã‚¿ã‚¤ãƒ ラインãŒä½¿ç”¨ã§ããªã„å•é¡Œã‚’ä¿®æ£ (Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/709) - Enhance: リモートユーザーã®ç…§ä¼šã‚’オリジナルã«ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã™ã‚‹ã‚ˆã†ã« diff --git a/packages/backend/src/core/MfmService.ts b/packages/backend/src/core/MfmService.ts index edfb3aa4fc1e352ad3c94ca1d9c106841c7704aa..8061622340b6bf22f825dcfbe841f10dea9aed9a 100644 --- a/packages/backend/src/core/MfmService.ts +++ b/packages/backend/src/core/MfmService.ts @@ -407,7 +407,9 @@ export class MfmService { const a = doc.createElement('a'); const { username, host, acct } = node.props; 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.setAttribute('href', remoteUserInfo + ? (remoteUserInfo.url ? remoteUserInfo.url : remoteUserInfo.uri) + : `${this.config.url}/${acct.endsWith(`@${this.config.url}`) ? acct.substring(0, acct.length - this.config.url.length - 1) : acct}`); a.className = 'u-url mention'; a.textContent = acct; return a;