feat: remote user to category migration should also migrate local user follows into category watches

This commit is contained in:
Julian Lam
2025-03-24 15:15:48 -04:00
parent ca934de55a
commit 700f91c44a
2 changed files with 65 additions and 31 deletions

View File

@@ -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);