diff options
Diffstat (limited to 'activitypub.c')
| -rw-r--r-- | activitypub.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activitypub.c b/activitypub.c index fc01466..2d84b0e 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -632,7 +632,8 @@ d_char *msg_follow(snac *snac, char *url_or_uid) | |||
| 632 | } | 632 | } |
| 633 | 633 | ||
| 634 | 634 | ||
| 635 | xs_dict *msg_note(snac *snac, xs_str *content, xs_val *rcpts, xs_str *in_reply_to, xs_list *attach) | 635 | xs_dict *msg_note(snac *snac, xs_str *content, xs_val *rcpts, |
| 636 | xs_str *in_reply_to, xs_list *attach, int priv) | ||
| 636 | /* creates a 'Note' message */ | 637 | /* creates a 'Note' message */ |
| 637 | { | 638 | { |
| 638 | xs *ntid = tid(0); | 639 | xs *ntid = tid(0); |
| @@ -702,8 +703,7 @@ xs_dict *msg_note(snac *snac, xs_str *content, xs_val *rcpts, xs_str *in_reply_t | |||
| 702 | ctxt = xs_dup(v); | 703 | ctxt = xs_dup(v); |
| 703 | 704 | ||
| 704 | /* if this message is public, ours will also be */ | 705 | /* if this message is public, ours will also be */ |
| 705 | if (is_msg_public(snac, p_msg) && | 706 | if (!priv && is_msg_public(snac, p_msg) && xs_list_in(to, public_address) == -1) |
| 706 | xs_list_in(to, public_address) == -1) | ||
| 707 | to = xs_list_append(to, public_address); | 707 | to = xs_list_append(to, public_address); |
| 708 | } | 708 | } |
| 709 | 709 | ||
| @@ -749,7 +749,7 @@ xs_dict *msg_note(snac *snac, xs_str *content, xs_val *rcpts, xs_str *in_reply_t | |||
| 749 | } | 749 | } |
| 750 | 750 | ||
| 751 | /* no recipients? must be for everybody */ | 751 | /* no recipients? must be for everybody */ |
| 752 | if (xs_list_len(to) == 0) | 752 | if (!priv && xs_list_len(to) == 0) |
| 753 | to = xs_list_append(to, public_address); | 753 | to = xs_list_append(to, public_address); |
| 754 | 754 | ||
| 755 | /* delete all cc recipients that also are in the to */ | 755 | /* delete all cc recipients that also are in the to */ |