mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-03 23:14:13 +00:00 
			
		
		
		
	fix: make sure mentions of local users get rendered correctly during AP delivery (resolves #645)
This commit is contained in:
		
							parent
							
								
									60be692a0a
								
							
						
					
					
						commit
						aae7fff494
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
					@ -413,7 +413,9 @@ export class MfmService {
 | 
				
			||||||
				const a = doc.createElement('a');
 | 
									const a = doc.createElement('a');
 | 
				
			||||||
				const { username, host, acct } = node.props;
 | 
									const { username, host, acct } = node.props;
 | 
				
			||||||
				const remoteUserInfo = mentionedRemoteUsers.find(remoteUser => remoteUser.username === username && remoteUser.host === host);
 | 
									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.className = 'u-url mention';
 | 
				
			||||||
				a.textContent = acct;
 | 
									a.textContent = acct;
 | 
				
			||||||
				return a;
 | 
									return a;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue