diff options
| author | 2025-07-27 15:41:40 +0200 | |
|---|---|---|
| committer | 2025-07-27 15:41:40 +0200 | |
| commit | 8278719e13bc70dc12daabda3b8d6b1f010b17a8 (patch) | |
| tree | 55dd18ef5b9dda4711373b3ca72cb80a87ca620f | |
| parent | Updated RELEASE_NOTES. (diff) | |
| download | penes-snac2-8278719e13bc70dc12daabda3b8d6b1f010b17a8.tar.gz penes-snac2-8278719e13bc70dc12daabda3b8d6b1f010b17a8.tar.xz penes-snac2-8278719e13bc70dc12daabda3b8d6b1f010b17a8.zip | |
In msg_delete(), also add actors that liked or boosted as destinations.
| -rw-r--r-- | activitypub.c | 16 |
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) | |||
| 1518 | /* now create the Delete */ | 1518 | /* now create the Delete */ |
| 1519 | msg = msg_base(snac, "Delete", "@object", snac->actor, "@now", tomb); | 1519 | msg = msg_base(snac, "Delete", "@object", snac->actor, "@now", tomb); |
| 1520 | 1520 | ||
| 1521 | msg = xs_dict_append(msg, "to", public_address); | 1521 | xs *to = xs_list_new(); |
| 1522 | xs *likes = object_likes(id); | ||
| 1523 | xs *boosts = object_announces(id); | ||
| 1524 | const char *v; | ||
| 1525 | |||
| 1526 | /* add everybody */ | ||
| 1527 | to = xs_list_append(to, public_address); | ||
| 1528 | |||
| 1529 | /* add actors that liked or boosted this */ | ||
| 1530 | xs_list_foreach(likes, v) | ||
| 1531 | to = xs_list_append(to, v); | ||
| 1532 | xs_list_foreach(boosts, v) | ||
| 1533 | to = xs_list_append(to, v); | ||
| 1534 | |||
| 1535 | msg = xs_dict_append(msg, "to", to); | ||
| 1522 | 1536 | ||
| 1523 | return msg; | 1537 | return msg; |
| 1524 | } | 1538 | } |