Support deletion of quiz when the Note deletion is related

This commit is contained in:
Niko 2022-02-22 10:07:39 +01:00
parent ab39f741f3
commit c6dd391bbf
1 changed files with 3 additions and 0 deletions

View File

@ -53,6 +53,9 @@ module.exports = {
const note = await db.getAPObject(msg.object.id, 'Note')
if (note !== null)
await db.table.objects().deleteOne({ _id: note._id })
if (typeof msg.object.id === 'string')
await db.table.quizs().deleteOne({ replyTo: msg.object.id })
return true
}
}