From 101062cb9232dfd6aac79c08b17247d44a9c4652 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 13 Jun 2024 14:35:09 -0400 Subject: [PATCH] fix: introduce artificial 5s delay for 1b12 announces --- src/api/activitypub.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/api/activitypub.js b/src/api/activitypub.js index b95c58db00..813436a154 100644 --- a/src/api/activitypub.js +++ b/src/api/activitypub.js @@ -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); } });