mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 12:36:02 +01:00
feat: save actor follower URL backreference and sorted set backreference
This commit is contained in:
@@ -204,6 +204,7 @@ inbox.accept = async (req) => {
|
||||
if (type === 'Follow') {
|
||||
const now = Date.now();
|
||||
await db.sortedSetAdd(`followingRemote:${uid}`, now, actor);
|
||||
await db.sortedSetAdd(`followersRemote:${actor}`, now, uid); // for followers backreference
|
||||
const followingRemoteCount = await db.sortedSetCard(`followingRemote:${uid}`);
|
||||
await user.setUserField(uid, 'followingRemoteCount', followingRemoteCount);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user