Node.js based forum software built for the modern web
fix: save remote follower count separately from local follower count
Julian Lam4218ecc4a055
diff --git a/src/activitypub/inbox.js b/src/activitypub/inbox.jsindex 6bbf25e748..096bb481d6 100644--- a/src/activitypub/inbox.js+++ b/src/activitypub/inbox.js@@ -53,9 +53,6 @@ async function handleFollow(type, actorId, objectId) {await db.sortedSetRemove(`followersRemote:${localUid}`, actorId);}- const [followerCount, followerRemoteCount] = await Promise.all([- db.sortedSetCard(`followers:${localUid}`),- db.sortedSetCard(`followersRemote:${localUid}`),- ]);- await user.setUserField(localUid, 'followerCount', followerCount + followerRemoteCount);+ const followerRemoteCount = await db.sortedSetCard(`followersRemote:${localUid}`);+ await user.setUserField(localUid, 'followerRemoteCount', followerRemoteCount);}