do not unfollow when moving

This commit is contained in:
Namekuji 2023-04-13 14:22:20 -04:00
parent 5e845f1ad5
commit 75d02a51a6
1 changed files with 1 additions and 5 deletions

View File

@ -136,16 +136,12 @@ export class AccountMoveService {
}, },
}); });
const followJobs: RelationshipJobData[] = []; const followJobs: RelationshipJobData[] = [];
const unfollowJobs: RelationshipJobData[] = [];
for (const following of followings) { for (const following of followings) {
if (!following.follower) continue; if (!following.follower) continue;
followJobs.push({ from: { id: following.follower.id }, to: { id: dst.id } }); followJobs.push({ from: { id: following.follower.id }, to: { id: dst.id } });
unfollowJobs.push({ from: { id: following.follower.id }, to: { id: src.id } });
} }
// Should be queued because this can cause a number of follow/unfollow per one move. // Should be queued because this can cause a number of follow per one move.
// No need to care job orders as there should be no overlaps of follow/unfollow target.
this.queueService.createFollowJob(followJobs); this.queueService.createFollowJob(followJobs);
this.queueService.createUnfollowJob(unfollowJobs);
} }
@bindThis @bindThis