mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-10 03:50:38 +03:00
mastoapi: ensure attachment and tag lists are tags.
This commit is contained in:
parent
5518bb509b
commit
0ee61d53d4
@ -709,7 +709,10 @@ xs_dict *mastoapi_status(snac *snac, const xs_dict *msg)
|
|||||||
attr_list = xs_list_append(attr_list, att);
|
attr_list = xs_list_append(attr_list, att);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
if (xs_type(att) == XSTYPE_LIST)
|
||||||
attr_list = xs_dup(att);
|
attr_list = xs_dup(att);
|
||||||
|
else
|
||||||
|
attr_list = xs_list_new();
|
||||||
|
|
||||||
/* if it has an image, add it as an attachment */
|
/* if it has an image, add it as an attachment */
|
||||||
xs_dict *image = xs_dict_get(msg, "image");
|
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);
|
tag_list = xs_list_append(tag_list, tag);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
if (xs_type(tag) == XSTYPE_LIST)
|
||||||
tag_list = xs_dup(tag);
|
tag_list = xs_dup(tag);
|
||||||
|
else
|
||||||
|
tag_list = xs_list_new();
|
||||||
|
|
||||||
tag = tag_list;
|
tag = tag_list;
|
||||||
xs_dict *v;
|
xs_dict *v;
|
||||||
|
Loading…
Reference in New Issue
Block a user