add TODO reminders for future merges
This commit is contained in:
parent
45a194b757
commit
8089a67b4e
1 changed files with 5 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue