mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 05:15:04 +00:00
Added the hashtag list to mastoapi_status().
What is this for?
This commit is contained in:
parent
cfca2adcb9
commit
9456a57954
1 changed files with 14 additions and 0 deletions
14
mastoapi.c
14
mastoapi.c
|
@ -590,6 +590,20 @@ xs_dict *mastoapi_status(snac *snac, const xs_dict *msg)
|
|||
ml = xs_list_append(ml, d1);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (strcmp(type, "Hashtag") == 0) {
|
||||
const char *name = xs_dict_get(v, "name");
|
||||
const char *href = xs_dict_get(v, "href");
|
||||
|
||||
if (!xs_is_null(name) && !xs_is_null(href)) {
|
||||
xs *nm = xs_strip_chars_i(xs_dup(name), "#");
|
||||
|
||||
d1 = xs_dict_append(d1, "name", nm);
|
||||
d1 = xs_dict_append(d1, "url", href);
|
||||
|
||||
htl = xs_list_append(htl, d1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
st = xs_dict_append(st, "mentions", ml);
|
||||
|
|
Loading…
Reference in a new issue