aboutsummaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/activitypub.c b/activitypub.c
index 100db67..f8b08fb 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -1518,7 +1518,21 @@ xs_dict *msg_delete(snac *snac, const char *id)
/* now create the Delete */
msg = msg_base(snac, "Delete", "@object", snac->actor, "@now", tomb);
- msg = xs_dict_append(msg, "to", public_address);
+ xs *to = xs_list_new();
+ xs *likes = object_likes(id);
+ xs *boosts = object_announces(id);
+ const char *v;
+
+ /* add everybody */
+ to = xs_list_append(to, public_address);
+
+ /* add actors that liked or boosted this */
+ xs_list_foreach(likes, v)
+ to = xs_list_append(to, v);
+ xs_list_foreach(boosts, v)
+ to = xs_list_append(to, v);
+
+ msg = xs_dict_append(msg, "to", to);
return msg;
}