Node.js based forum software built for the modern web
fix: don't bubble up post-already-deleted error on inbox.delete
Julian Lam4ed6ef803453
diff --git a/src/activitypub/inbox.js b/src/activitypub/inbox.jsindex 2a52a96903..379db0b1ba 100644--- a/src/activitypub/inbox.js+++ b/src/activitypub/inbox.js@@ -298,7 +298,14 @@ inbox.delete = async (req) => {const uid = await posts.getPostField(id, 'uid');await activitypub.feps.announce(id, req.body);- await api.posts[method]({ uid }, { pid: id });+ try {+ await api.posts[method]({ uid }, { pid: id });+ } catch (e) {+ // Can ignore deletion if already deleted+ if (e.message !== '[[error:post-already-deleted]]') {+ throw e;+ }+ }break;}