mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: wrap try..catch around topics.reply in note assertion to output errors
This commit is contained in:
@@ -196,6 +196,7 @@ Notes.assert = async (uid, input, options = { skipChecks: false }) => {
|
||||
for (const post of unprocessed) {
|
||||
const { to, cc, attachment } = post._activitypub;
|
||||
|
||||
try {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await topics.reply(post);
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
@@ -203,6 +204,9 @@ Notes.assert = async (uid, input, options = { skipChecks: false }) => {
|
||||
Notes.updateLocalRecipients(post.pid, { to, cc }),
|
||||
posts.attachments.update(post.pid, attachment),
|
||||
]);
|
||||
} catch (e) {
|
||||
activitypub.helpers.log(`[activitypub/notes.assert] Could not add reply (${post.pid}): ${e.message}`);
|
||||
}
|
||||
}
|
||||
|
||||
await Promise.all([
|
||||
|
||||
Reference in New Issue
Block a user