diff options
| author | 2025-01-11 01:39:37 +0100 | |
|---|---|---|
| committer | 2025-01-11 01:39:37 +0100 | |
| commit | ff44142b30ceded6ed7db24d033296b0966edb27 (patch) | |
| tree | 7a5e93d3183391d12ef6ea1d3837b1212204ecb2 /main.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 'main.c')
| -rw-r--r-- | main.c | 11 |
1 files changed, 2 insertions, 9 deletions
| @@ -668,15 +668,8 @@ int main(int argc, char *argv[]) | |||
| 668 | else | 668 | else |
| 669 | content = xs_dup(url); | 669 | content = xs_dup(url); |
| 670 | 670 | ||
| 671 | msg = msg_note(&snac, content, NULL, NULL, attl, 0, getenv("LANG")); | 671 | msg = msg_note(&snac, content, NULL, NULL, attl, |
| 672 | 672 | strcmp(cmd, "note_unlisted") == 0 ? 2 : 0, getenv("LANG")); | |
| 673 | if (strcmp(cmd, "note_unlisted") == 0) { | ||
| 674 | /* according to Mastodon, "unlisted" posts (now called "quiet public") | ||
| 675 | has the public address as a cc instead of to, so toggle it */ | ||
| 676 | xs *to = xs_dup(xs_dict_get(msg, "to")); | ||
| 677 | msg = xs_dict_set(msg, "cc", to); | ||
| 678 | msg = xs_dict_set(msg, "to", xs_stock(XSTYPE_LIST)); | ||
| 679 | } | ||
| 680 | 673 | ||
| 681 | c_msg = msg_create(&snac, msg); | 674 | c_msg = msg_create(&snac, msg); |
| 682 | 675 | ||