diff --git a/src/flags.js b/src/flags.js index be8ba8856f..ee2d171b2d 100644 --- a/src/flags.js +++ b/src/flags.js @@ -493,6 +493,8 @@ Flags.purge = async function (flagIds) { ...assignedFlags.map(flagObj => ([`flags:byAssignee:${flagObj.assignee}`, flagObj.flagId])), ...userFlags.map(flagObj => ([`flags:byTargetUid:${flagObj.targetUid}`, flagObj.flagId])), ]), + db.deleteObjectFields(postFlags.map(flagObj => `post:${flagObj.targetId}`, ['flagId'])), + db.deleteObjectFields(userFlags.map(flagObj => `user:${flagObj.targetId}`, ['flagId'])), db.deleteAll([ ...flagIds.map(flagId => `flag:${flagId}`), ...flagIds.map(flagId => `flag:${flagId}:notes`),