mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-06 17:16:28 +02:00
fix: don't bubble up post-already-deleted error on inbox.delete
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user