diff options
Diffstat (limited to 'mastoapi.c')
| -rw-r--r-- | mastoapi.c | 10 |
1 files changed, 8 insertions, 2 deletions
| @@ -2650,8 +2650,14 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path, | |||
| 2650 | } | 2650 | } |
| 2651 | 2651 | ||
| 2652 | /* prepare the message */ | 2652 | /* prepare the message */ |
| 2653 | xs *msg = msg_note(&snac, content, NULL, irt, attach_list, | 2653 | int scope = 1; |
| 2654 | strcmp(visibility, "public") == 0 ? 0 : 1, language); | 2654 | if (strcmp(visibility, "unlisted") == 0) |
| 2655 | scope = 2; | ||
| 2656 | else | ||
| 2657 | if (strcmp(visibility, "public") == 0) | ||
| 2658 | scope = 0; | ||
| 2659 | |||
| 2660 | xs *msg = msg_note(&snac, content, NULL, irt, attach_list, scope, language); | ||
| 2655 | 2661 | ||
| 2656 | if (!xs_is_null(summary) && *summary) { | 2662 | if (!xs_is_null(summary) && *summary) { |
| 2657 | msg = xs_dict_set(msg, "sensitive", xs_stock(XSTYPE_TRUE)); | 2663 | msg = xs_dict_set(msg, "sensitive", xs_stock(XSTYPE_TRUE)); |