From 8089a67b4e92608ab7397c734194c6ce261491d0 Mon Sep 17 00:00:00 2001 From: Hazelnoot Date: Sun, 14 Sep 2025 09:44:08 -0400 Subject: [PATCH] add TODO reminders for future merges --- packages/backend/src/core/AccountMoveService.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/backend/src/core/AccountMoveService.ts b/packages/backend/src/core/AccountMoveService.ts index cd565fe191..122045ef6c 100644 --- a/packages/backend/src/core/AccountMoveService.ts +++ b/packages/backend/src/core/AccountMoveService.ts @@ -128,6 +128,7 @@ export class AccountMoveService { to: { id: followeeId }, })), process.env.NODE_ENV === 'test' ? 10000 : 1000 * 60 * 60 * 24); + // TODO add this to relationship queue await this.postMoveProcess(src, dst); return iObj; @@ -322,20 +323,24 @@ export class AccountMoveService { if (localFollowerIds.length === 0) return; // Set the old account's following and followers counts to 0. + // TODO use CollapsedQueueService when merged await this.usersRepository.update({ id: oldAccount.id }, { followersCount: 0, followingCount: 0 }); // Decrease following counts of local followers by 1. + // TODO use CollapsedQueueService when merged await this.usersRepository.decrement({ id: In(localFollowerIds) }, 'followingCount', 1); // Decrease follower counts of local followees by 1. const oldFollowings = await this.cacheService.userFollowingsCache.fetch(oldAccount.id); if (oldFollowings.size > 0) { + // TODO use CollapsedQueueService when merged await this.usersRepository.decrement({ id: In(Array.from(oldFollowings.keys())) }, 'followersCount', 1); } // Update instance stats by decreasing remote followers count by the number of local followers who were following the old account. if (this.meta.enableStatsForFederatedInstances) { if (this.userEntityService.isRemoteUser(oldAccount)) { + // TODO use CollapsedQueueService when merged this.federatedInstanceService.fetchOrRegister(oldAccount.host).then(async i => { await this.instancesRepository.decrement({ id: i.id }, 'followersCount', localFollowerIds.length); if (this.meta.enableChartsForFederatedInstances) {