fix: call syncfollowcounts on unfollow as well

This commit is contained in:
Julian Lam
2026-03-19 11:36:28 -04:00
parent f51e1b2a28
commit ebe709da89

View File

@@ -471,7 +471,8 @@ Out.undo.follow = enabledCheck(async (type, id, actor) => {
db.sortedSetRemove(`followingRemote:${id}`, actor),
db.sortedSetRemove(`followRequests:uid.${id}`, actor),
db.sortedSetRemove(`followersRemote:${actor}`, id),
db.decrObjectField(`user:${id}`, 'followingRemoteCount'),
user.syncFollowCounts(id, true, false),
user.syncFollowCounts(actor, false, true),
]);
} else if (type === 'cid') {
await Promise.all([