feat: accept and undo support

This commit is contained in:
Julian Lam
2023-12-13 13:15:03 -05:00
parent 68d5e4a8ab
commit 4c1b2b3fe6
3 changed files with 73 additions and 8 deletions

View File

@@ -113,6 +113,21 @@ Controller.postInbox = async (req, res) => {
await activitypub.inbox.unfollow(req.body.actor.name, req.body.object.name);
break;
}
case 'Accept': {
await activitypub.inbox.accept(req);
break;
}
case 'Undo': {
await activitypub.inbox.undo(req);
break;
}
default: {
console.log('Unhandled Activity!!!');
console.log(req.body);
}
}
res.sendStatus(201);