diff options
author | default <nobody@localhost> | 2024-06-08 21:25:02 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2024-06-08 21:25:02 +0200 |
commit | 6e8adc86d00dccb9d6569336e6f208226c6bed22 (patch) | |
tree | 1b60f285f2bba247e83918b738ae80ba59b80ee1 /mastoapi.c | |
parent | bbb365e81be704d4afc93469c15f7396d56f56fa (diff) |
mastoapi: Added missing field in list creation.
Diffstat (limited to 'mastoapi.c')
-rw-r--r-- | mastoapi.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2931,8 +2931,10 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path, if (xs_type(title) == XSTYPE_STRING) { /* add the list */ xs *out = xs_dict_new(); + xs *lid = list_maint(&snac, title, 1); - if (xs_type(list_maint(&snac, title, 1)) == XSTYPE_TRUE) { + if (!xs_is_null(lid)) { + out = xs_dict_append(out, "id", lid); out = xs_dict_append(out, "title", title); out = xs_dict_append(out, "replies_policy", xs_dict_get_def(args, "replies_policy", "list")); out = xs_dict_append(out, "exclusive", xs_stock(XSTYPE_FALSE)); |