diff options
| author | 2025-01-11 01:39:37 +0100 | |
|---|---|---|
| committer | 2025-01-11 01:39:37 +0100 | |
| commit | ff44142b30ceded6ed7db24d033296b0966edb27 (patch) | |
| tree | 7a5e93d3183391d12ef6ea1d3837b1212204ecb2 /activitypub.c | |
| parent | If a post has a location, show it. (diff) | |
| download | penes-snac2-ff44142b30ceded6ed7db24d033296b0966edb27.tar.gz penes-snac2-ff44142b30ceded6ed7db24d033296b0966edb27.tar.xz penes-snac2-ff44142b30ceded6ed7db24d033296b0966edb27.zip | |
Moved creation of "quiet public" posts to msg_note(), where it belongs.
Diffstat (limited to 'activitypub.c')
| -rw-r--r-- | activitypub.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/activitypub.c b/activitypub.c index 4966482..369423d 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -1486,7 +1486,7 @@ xs_dict *msg_note(snac *snac, const xs_str *content, const xs_val *rcpts, | |||
| 1486 | xs_list *p; | 1486 | xs_list *p; |
| 1487 | const xs_val *v; | 1487 | const xs_val *v; |
| 1488 | 1488 | ||
| 1489 | /* FIXME: implement scopes 2 and 3 */ | 1489 | /* FIXME: implement scope 3 */ |
| 1490 | int priv = scope == 1; | 1490 | int priv = scope == 1; |
| 1491 | 1491 | ||
| 1492 | if (rcpts == NULL) | 1492 | if (rcpts == NULL) |
| @@ -1606,6 +1606,12 @@ xs_dict *msg_note(snac *snac, const xs_str *content, const xs_val *rcpts, | |||
| 1606 | } | 1606 | } |
| 1607 | } | 1607 | } |
| 1608 | 1608 | ||
| 1609 | if (scope == 2) { | ||
| 1610 | /* Mastodon's "quiet public": add public address to cc */ | ||
| 1611 | if (xs_list_in(cc, public_address) == -1) | ||
| 1612 | cc = xs_list_append(cc, public_address); | ||
| 1613 | } | ||
| 1614 | else | ||
| 1609 | /* no recipients? must be for everybody */ | 1615 | /* no recipients? must be for everybody */ |
| 1610 | if (!priv && xs_list_len(to) == 0) | 1616 | if (!priv && xs_list_len(to) == 0) |
| 1611 | to = xs_list_append(to, public_address); | 1617 | to = xs_list_append(to, public_address); |