summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
authorGravatar default2024-06-08 21:25:02 +0200
committerGravatar default2024-06-08 21:25:02 +0200
commit6e8adc86d00dccb9d6569336e6f208226c6bed22 (patch)
tree1b60f285f2bba247e83918b738ae80ba59b80ee1 /mastoapi.c
parentMany Mastodon apps don't send Content-Type in DELETE, so ignore it. (diff)
downloadsnac2-6e8adc86d00dccb9d6569336e6f208226c6bed22.tar.gz
snac2-6e8adc86d00dccb9d6569336e6f208226c6bed22.tar.xz
snac2-6e8adc86d00dccb9d6569336e6f208226c6bed22.zip
mastoapi: Added missing field in list creation.
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mastoapi.c b/mastoapi.c
index 84569e1..7413afa 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -2931,8 +2931,10 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path,
2931 if (xs_type(title) == XSTYPE_STRING) { 2931 if (xs_type(title) == XSTYPE_STRING) {
2932 /* add the list */ 2932 /* add the list */
2933 xs *out = xs_dict_new(); 2933 xs *out = xs_dict_new();
2934 xs *lid = list_maint(&snac, title, 1);
2934 2935
2935 if (xs_type(list_maint(&snac, title, 1)) == XSTYPE_TRUE) { 2936 if (!xs_is_null(lid)) {
2937 out = xs_dict_append(out, "id", lid);
2936 out = xs_dict_append(out, "title", title); 2938 out = xs_dict_append(out, "title", title);
2937 out = xs_dict_append(out, "replies_policy", xs_dict_get_def(args, "replies_policy", "list")); 2939 out = xs_dict_append(out, "replies_policy", xs_dict_get_def(args, "replies_policy", "list"));
2938 out = xs_dict_append(out, "exclusive", xs_stock(XSTYPE_FALSE)); 2940 out = xs_dict_append(out, "exclusive", xs_stock(XSTYPE_FALSE));