From 95b5c47f46a685c25cf42ffef4bae265878d3e27 Mon Sep 17 00:00:00 2001 From: Pichu Date: Sun, 23 Jun 2024 13:12:41 +0000 Subject: [PATCH] chore(backend): update ApPersonService to handle user without endpoint --- .../src/core/activitypub/models/ApPersonService.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/core/activitypub/models/ApPersonService.ts b/packages/backend/src/core/activitypub/models/ApPersonService.ts index 398c8695d2eb..8cef4d0a6ec0 100644 --- a/packages/backend/src/core/activitypub/models/ApPersonService.ts +++ b/packages/backend/src/core/activitypub/models/ApPersonService.ts @@ -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));