aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgrunfink <grunfink@comam.es>2025-07-27 15:41:40 +0200
committergrunfink <grunfink@comam.es>2025-07-27 15:41:40 +0200
commit8278719e13bc70dc12daabda3b8d6b1f010b17a8 (patch)
tree55dd18ef5b9dda4711373b3ca72cb80a87ca620f
parent775f15aaaa60a06ed0d796cb7125bc217f180f06 (diff)
In msg_delete(), also add actors that liked or boosted as destinations.
-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;
}