diff --git a/src/activitypub/out.js b/src/activitypub/out.js index 45d902fb05..5242e6df6d 100644 --- a/src/activitypub/out.js +++ b/src/activitypub/out.js @@ -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([