fix: introduce artificial 5s delay for 1b12 announces

This commit is contained in:
Julian Lam
2024-06-13 14:35:09 -04:00
parent acd1630b9f
commit 101062cb92

View File

@@ -163,7 +163,9 @@ activitypubApi.create.note = enabledCheck(async (caller, { pid }) => {
await activitypub.send('uid', caller.uid, Array.from(targets), payloads.create);
if (followers.length) {
await activitypub.send('cid', cid, followers, payloads.announce);
setTimeout(() => { // Delay sending to avoid potential race condition
activitypub.send('cid', cid, followers, payloads.announce);
}, 5000);
}
});