From ebe709da89b356f5f4bfdace77e46d451c286580 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 19 Mar 2026 11:36:28 -0400 Subject: [PATCH] fix: call syncfollowcounts on unfollow as well --- src/activitypub/out.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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([