summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/mastoapi.c b/mastoapi.c
index 48f32b7..9b3d68f 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -767,11 +767,22 @@ xs_dict *mastoapi_status(snac *snac, const xs_dict *msg)
767 xs *ml = xs_list_new(); 767 xs *ml = xs_list_new();
768 xs *htl = xs_list_new(); 768 xs *htl = xs_list_new();
769 xs *eml = xs_list_new(); 769 xs *eml = xs_list_new();
770 xs_list *p = xs_dict_get(msg, "tag"); 770 xs_list *tag = xs_dict_get(msg, "tag");
771 xs_dict *v;
772 int n = 0; 771 int n = 0;
773 772
774 while (xs_list_iter(&p, &v)) { 773 xs *tag_list = NULL;
774
775 if (xs_type(tag) == XSTYPE_DICT) {
776 tag_list = xs_list_new();
777 tag_list = xs_list_append(tag_list, tag);
778 }
779 else
780 tag_list = xs_dup(tag);
781
782 tag = tag_list;
783 xs_dict *v;
784
785 while (xs_list_iter(&tag, &v)) {
775 const char *type = xs_dict_get(v, "type"); 786 const char *type = xs_dict_get(v, "type");
776 787
777 if (xs_is_null(type)) 788 if (xs_is_null(type))