From ff44142b30ceded6ed7db24d033296b0966edb27 Mon Sep 17 00:00:00 2001 From: default Date: Sat, 11 Jan 2025 01:39:37 +0100 Subject: Moved creation of "quiet public" posts to msg_note(), where it belongs. --- main.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'main.c') 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[]) else content = xs_dup(url); - msg = msg_note(&snac, content, NULL, NULL, attl, 0, getenv("LANG")); - - if (strcmp(cmd, "note_unlisted") == 0) { - /* according to Mastodon, "unlisted" posts (now called "quiet public") - has the public address as a cc instead of to, so toggle it */ - xs *to = xs_dup(xs_dict_get(msg, "to")); - msg = xs_dict_set(msg, "cc", to); - msg = xs_dict_set(msg, "to", xs_stock(XSTYPE_LIST)); - } + msg = msg_note(&snac, content, NULL, NULL, attl, + strcmp(cmd, "note_unlisted") == 0 ? 2 : 0, getenv("LANG")); c_msg = msg_create(&snac, msg); -- cgit v1.2.3