diff options
author | default <nobody@localhost> | 2023-08-25 07:47:18 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2023-08-25 07:47:18 +0200 |
commit | 0ee61d53d4dfd54ba9f453806a90723cdbbf69b8 (patch) | |
tree | 5defbf8d629e1a9043795774d0974436543ce38d /mastoapi.c | |
parent | 5518bb509b5f3c197c616608eae5f44d676e4586 (diff) |
mastoapi: ensure attachment and tag lists are tags.
Diffstat (limited to 'mastoapi.c')
-rw-r--r-- | mastoapi.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -709,7 +709,10 @@ xs_dict *mastoapi_status(snac *snac, const xs_dict *msg) attr_list = xs_list_append(attr_list, att); } else + if (xs_type(att) == XSTYPE_LIST) attr_list = xs_dup(att); + else + attr_list = xs_list_new(); /* if it has an image, add it as an attachment */ xs_dict *image = xs_dict_get(msg, "image"); @@ -777,7 +780,10 @@ xs_dict *mastoapi_status(snac *snac, const xs_dict *msg) tag_list = xs_list_append(tag_list, tag); } else + if (xs_type(tag) == XSTYPE_LIST) tag_list = xs_dup(tag); + else + tag_list = xs_list_new(); tag = tag_list; xs_dict *v; |