chore(backend): update ApPersonService to handle user without endpoint

This commit is contained in:
Pichu 2024-06-23 13:12:41 +00:00 committed by Pichu Chen
parent a6edd50a5d
commit 95b5c47f46
1 changed files with 6 additions and 4 deletions

View File

@ -534,10 +534,12 @@ export class ApPersonService implements OnModuleInit {
this.hashtagService.updateUsertags(exist, tags);
// 該当ユーザーが既にフォロワーになっていた場合はFollowingもアップデートする
await this.followingsRepository.update(
{ followerId: exist.id },
{ followerSharedInbox: person.sharedInbox ?? person.endpoints?.sharedInbox },
);
if (person.sharedInbox != null || person.endpoints?.sharedInbox != null) {
await this.followingsRepository.update(
{ followerId: exist.id },
{ followerSharedInbox: person.sharedInbox ?? person.endpoints?.sharedInbox },
);
}
await this.updateFeatured(exist.id, resolver).catch(err => this.logger.error(err));