mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 01:56:12 +01:00
fix: save remote follower count separately from local follower count
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user