mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 04:47:06 +02:00
feat: remote user to category migration should also migrate local user follows into category watches
This commit is contained in:
@@ -418,6 +418,13 @@ async function _migratePersonToGroup(categoryObjs) {
|
||||
});
|
||||
}
|
||||
}));
|
||||
|
||||
const followers = await db.getSortedSetMembersWithScores(`followersRemote:${id}`);
|
||||
await db.sortedSetAdd(
|
||||
`cid:${id}:uid:watch:state`,
|
||||
followers.map(() => categories.watchStates.tracking),
|
||||
followers.map(({ value }) => value),
|
||||
);
|
||||
await user.deleteAccount(id);
|
||||
}));
|
||||
await categories.onTopicsMoved(ids);
|
||||
|
||||
Reference in New Issue
Block a user