mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-03 23:14:13 +00:00 
			
		
		
		
	fix(backend): fix apResolver (#15010)
* fix(backend): fix apResolver * fix * add comments * tweak comment
This commit is contained in:
		
							parent
							
								
									3a6c2aa835
								
							
						
					
					
						commit
						c1f19fad1e
					
				
					 2 changed files with 5 additions and 3 deletions
				
			
		| 
						 | 
					@ -130,7 +130,8 @@ export class ApInboxService {
 | 
				
			||||||
		if (actor.uri) {
 | 
							if (actor.uri) {
 | 
				
			||||||
			if (actor.lastFetchedAt == null || Date.now() - actor.lastFetchedAt.getTime() > 1000 * 60 * 60 * 24) {
 | 
								if (actor.lastFetchedAt == null || Date.now() - actor.lastFetchedAt.getTime() > 1000 * 60 * 60 * 24) {
 | 
				
			||||||
				setImmediate(() => {
 | 
									setImmediate(() => {
 | 
				
			||||||
					this.apPersonService.updatePerson(actor.uri, resolver);
 | 
										// 同一ユーザーの情報を再度処理するので、使用済みのresolverを再利用してはいけない
 | 
				
			||||||
 | 
										this.apPersonService.updatePerson(actor.uri);
 | 
				
			||||||
				});
 | 
									});
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -137,10 +137,11 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
 | 
				
			||||||
			if (local != null) return local;
 | 
								if (local != null) return local;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// 同一ユーザーの情報を再度処理するので、使用済みのresolverを再利用してはいけない
 | 
				
			||||||
		return await this.mergePack(
 | 
							return await this.mergePack(
 | 
				
			||||||
			me,
 | 
								me,
 | 
				
			||||||
			isActor(object) ? await this.apPersonService.createPerson(getApId(object), resolver) : null,
 | 
								isActor(object) ? await this.apPersonService.createPerson(getApId(object)) : null,
 | 
				
			||||||
			isPost(object) ? await this.apNoteService.createNote(getApId(object), undefined, resolver, true) : null,
 | 
								isPost(object) ? await this.apNoteService.createNote(getApId(object), undefined, undefined, true) : null,
 | 
				
			||||||
		);
 | 
							);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue