summaryrefslogtreecommitdiff
path: root/activitypub.js
diff options
context:
space:
mode:
authorRaphael <raphaelkabo@gmail.com>2022-12-28 16:38:57 +0000
committerGitHub <noreply@github.com>2022-12-28 16:38:57 +0000
commit8627537af32c8e88fa8bdfe224b92621c7e2df5c (patch)
treebf1820828f450977151bf6dd4cfd12af87a4026c /activitypub.js
parente93b23db71df18480b29ed53c1b8247e7f0f83a7 (diff)
parentd39734bf3fd84c568c15e90d6edb75e68d74b3e1 (diff)
Merge pull request #85 from redneckcatholic/fix-event-deletion
Fix event deletion
Diffstat (limited to 'activitypub.js')
-rw-r--r--activitypub.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/activitypub.js b/activitypub.js
index 8620e81..442f03c 100644
--- a/activitypub.js
+++ b/activitypub.js
@@ -341,8 +341,11 @@ function broadcastUpdateMessage(apObject, followers, eventID) {
}
function broadcastDeleteMessage(apObject, followers, eventID, callback) {
- if (!isFederated) return;
callback = callback || function () { };
+ if (!isFederated) {
+ callback([]);
+ return;
+ }
// we need to build an array of promises for each message we're sending, run Promise.all(), and then that will resolve when every message has been sent (or failed)
// per spec, each promise will execute *as it is built*, which is fine, we just need the guarantee that they are all done
let promises = [];