From ad9f72291feaccb2e70b9c07bd62d67e4a0979e8 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 8 Apr 2023 20:03:32 +0900 Subject: [PATCH] use for of --- packages/backend/src/core/activitypub/ApInboxService.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/core/activitypub/ApInboxService.ts b/packages/backend/src/core/activitypub/ApInboxService.ts index a95c17831..ff90af435 100644 --- a/packages/backend/src/core/activitypub/ApInboxService.ts +++ b/packages/backend/src/core/activitypub/ApInboxService.ts @@ -771,17 +771,17 @@ export class ApInboxService { where: { followeeId: old_acc.id, followerHost: IsNull(), // follower is local - } + }, }); - followings.forEach(async (following) => { - if (!following.follower) return; + for (const following of followings) { + if (!following.follower) continue; try { await this.userFollowingService.follow(following.follower, new_acc); await this.userFollowingService.unfollow(following.follower, old_acc); } catch { /* empty */ } - }); + } return 'ok'; }