mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-21 07:50:37 +01:00
fix: add replies in parallel during note assertion
This commit is contained in:
@@ -248,18 +248,16 @@ Notes.assert = async (uid, input, options = { skipChecks: false }) => {
|
||||
}
|
||||
}
|
||||
|
||||
for (const post of unprocessed) {
|
||||
await Promise.all(unprocessed.map(async (post) => {
|
||||
const { to, cc } = post._activitypub;
|
||||
|
||||
try {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await topics.reply(post);
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await Notes.updateLocalRecipients(post.pid, { to, cc });
|
||||
} catch (e) {
|
||||
activitypub.helpers.log(`[activitypub/notes.assert] Could not add reply (${post.pid}): ${e.message}`);
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
await Notes.syncUserInboxes(tid, uid);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user