summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-03-02 10:26:52 +0100
committerdefault <nobody@localhost>2023-03-02 10:26:52 +0100
commit4773d6c64cdee56c9c2b4061ef9587bd3c342b7b (patch)
tree74f81515ab349534ec934743691bb93d201ef98d
parent987f1d288b308efac6d4c163339c663df76c4d6e (diff)
Output to the shared inboxes only the public messages.
-rw-r--r--activitypub.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/activitypub.c b/activitypub.c
index 1b89e3c..455a6fe 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -1101,19 +1101,22 @@ void process_user_queue_item(snac *snac, xs_dict *q_item)
if (strcmp(type, "message") == 0) {
xs_dict *msg = xs_dict_get(q_item, "message");
xs *rcpts = recipient_list(snac, msg, 1);
- xs *shibx = inbox_list();
xs_set inboxes;
xs_list *p;
- xs_str *v;
xs_str *actor;
xs_set_init(&inboxes);
- /* send first to the collected inboxes */
- p = shibx;
- while (xs_list_iter(&p, &v)) {
- if (xs_set_add(&inboxes, v) == 1)
- enqueue_output(snac, msg, v, 0);
+ /* if it's public, send first to the collected inboxes */
+ if (is_msg_public(snac, msg)) {
+ xs *shibx = inbox_list();
+ xs_str *v;
+
+ p = shibx;
+ while (xs_list_iter(&p, &v)) {
+ if (xs_set_add(&inboxes, v) == 1)
+ enqueue_output(snac, msg, v, 0);
+ }
}
/* iterate now the recipients */