mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 07:24:13 +00:00 
			
		
		
		
	fix(backend): ローカルユーザーへのメンションを含むノートが連合される際に正しいURLに変換されないことがある問題を修正 (#14879)
* fix: make sure mentions of local users get rendered correctly during AP delivery (resolves #645) * Update Changelog * indent --------- Co-authored-by: Laura Hausmann <laura@hausmann.dev> Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									3a421837bf
								
							
						
					
					
						commit
						4a62051ce7
					
				
					 2 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -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: リモートユーザーの照会をオリジナルにリダイレクトするように
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue