diff --git a/api/src/activity/federation.js b/api/src/activity/federation.js index 1297ce4..daef13b 100644 --- a/api/src/activity/federation.js +++ b/api/src/activity/federation.js @@ -37,6 +37,15 @@ module.exports = { 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.object.type === 'Follow') {