mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-01 05:54:12 +00:00 
			
		
		
		
	merge: fix: make sure mentions of local users get rendered correctly during AP delivery (!712)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/712 Closes #645 Approved-by: Hazelnoot <acomputerdog@gmail.com> Approved-by: Marie <github@yuugi.dev>
This commit is contained in:
		
						commit
						c59852f834
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -413,7 +413,9 @@ export class MfmService { | |||
| 				const a = doc.createElement('a'); | ||||
| 				const { username, host, acct } = node.props; | ||||
| 				const remoteUserInfo = mentionedRemoteUsers.find(remoteUser => remoteUser.username === username && remoteUser.host === host); | ||||
| 				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; | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue