summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorGravatar default2025-01-11 01:39:37 +0100
committerGravatar default2025-01-11 01:39:37 +0100
commitff44142b30ceded6ed7db24d033296b0966edb27 (patch)
tree7a5e93d3183391d12ef6ea1d3837b1212204ecb2 /main.c
parentIf a post has a location, show it. (diff)
downloadsnac2-ff44142b30ceded6ed7db24d033296b0966edb27.tar.gz
snac2-ff44142b30ceded6ed7db24d033296b0966edb27.tar.xz
snac2-ff44142b30ceded6ed7db24d033296b0966edb27.zip
Moved creation of "quiet public" posts to msg_note(), where it belongs.
Diffstat (limited to 'main.c')
-rw-r--r--main.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/main.c b/main.c
index 5b1dd61..83b73af 100644
--- a/main.c
+++ b/main.c
@@ -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