Skip to content

Commit

Permalink
chore(backend): update ApPersonService to handle user without endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
PichuChen committed Jun 23, 2024
1 parent 2b8056a commit 37e8fb9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/backend/src/core/activitypub/models/ApPersonService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -535,10 +535,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));

Expand Down

0 comments on commit 37e8fb9

Please sign in to comment.