Support AP post deletion event

This commit is contained in:
Niko 2022-02-21 20:31:44 +01:00
parent e5d4c66f77
commit 4bb004f675
1 changed files with 9 additions and 0 deletions

View File

@ -37,6 +37,15 @@ module.exports = {
return true return true
} }
} }
if (msg.activity.type === 'Delete')
{
if (msg.object.type === 'Note') {
const note = await db.getAPObject(msg.object.id, 'Note')
if (note !== null)
await db.table.objects().deleteOne({ _id: note._id })
return true
}
}
if (msg.activity.type === 'Reject') if (msg.activity.type === 'Reject')
{ {
if (msg.object.type === 'Follow') { if (msg.object.type === 'Follow') {