mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-12-25 16:53:37 +00:00
mastoapi: fixed audio attachments.
This commit is contained in:
parent
1167b64f8f
commit
00004500a9
1 changed files with 3 additions and 2 deletions
|
@ -912,7 +912,7 @@ xs_dict *mastoapi_status(snac *snac, const xs_dict *msg)
|
|||
const char *o_href = xs_dict_get(v, "href");
|
||||
const char *name = xs_dict_get(v, "name");
|
||||
|
||||
if (xs_match(type, "image/*|video/*|Image|Video")) { /* */
|
||||
if (xs_match(type, "image/*|video/*|audio/*|Image|Video")) { /* */
|
||||
xs *matteid = xs_fmt("%s_%d", id, xs_list_len(matt));
|
||||
xs *href = make_url(o_href, proxy, 1);
|
||||
|
||||
|
@ -924,7 +924,8 @@ xs_dict *mastoapi_status(snac *snac, const xs_dict *msg)
|
|||
d = xs_dict_append(d, "remote_url", href);
|
||||
d = xs_dict_append(d, "description", name);
|
||||
|
||||
d = xs_dict_append(d, "type", (*type == 'v' || *type == 'V') ? "video" : "image");
|
||||
d = xs_dict_append(d, "type", (*type == 'v' || *type == 'V') ? "video" :
|
||||
(*type == 'a' || *type == 'A') ? "audio" : "image");
|
||||
|
||||
matt = xs_list_append(matt, d);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue