From 27ac14da3d7d25810aa1aa132f1e396f1150e546 Mon Sep 17 00:00:00 2001 From: Niko Date: Wed, 16 Feb 2022 11:15:39 +0100 Subject: [PATCH] Delete a "Block" event when recieved in INBOX --- api/src/activity/federation.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api/src/activity/federation.js b/api/src/activity/federation.js index 7348c81..02fbc42 100644 --- a/api/src/activity/federation.js +++ b/api/src/activity/federation.js @@ -10,6 +10,14 @@ module.exports = { } return true; } + if (msg.activity.type === 'Undo') + { + if (msg.object.type === 'Block') { + await db.table.objects().deleteOne( + { id: msg.object.id, type: 'Block' }) + return true; + } + } console.log('INBOX') console.log(msg)