diff options
| author | 2024-12-21 16:49:45 +0100 | |
|---|---|---|
| committer | 2024-12-21 16:49:45 +0100 | |
| commit | 00004500a9b56ca22cfe5e6949ea5072d0a63414 (patch) | |
| tree | 52b20071e1192e7beebbe8bc2e26dd5f58f897b2 /mastoapi.c | |
| parent | mastoapi: minor tweak to notification list (Tusky was in a forever request lo... (diff) | |
| download | penes-snac2-00004500a9b56ca22cfe5e6949ea5072d0a63414.tar.gz penes-snac2-00004500a9b56ca22cfe5e6949ea5072d0a63414.tar.xz penes-snac2-00004500a9b56ca22cfe5e6949ea5072d0a63414.zip | |
mastoapi: fixed audio attachments.
Diffstat (limited to 'mastoapi.c')
| -rw-r--r-- | mastoapi.c | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -912,7 +912,7 @@ xs_dict *mastoapi_status(snac *snac, const xs_dict *msg) | |||
| 912 | const char *o_href = xs_dict_get(v, "href"); | 912 | const char *o_href = xs_dict_get(v, "href"); |
| 913 | const char *name = xs_dict_get(v, "name"); | 913 | const char *name = xs_dict_get(v, "name"); |
| 914 | 914 | ||
| 915 | if (xs_match(type, "image/*|video/*|Image|Video")) { /* */ | 915 | if (xs_match(type, "image/*|video/*|audio/*|Image|Video")) { /* */ |
| 916 | xs *matteid = xs_fmt("%s_%d", id, xs_list_len(matt)); | 916 | xs *matteid = xs_fmt("%s_%d", id, xs_list_len(matt)); |
| 917 | xs *href = make_url(o_href, proxy, 1); | 917 | xs *href = make_url(o_href, proxy, 1); |
| 918 | 918 | ||
| @@ -924,7 +924,8 @@ xs_dict *mastoapi_status(snac *snac, const xs_dict *msg) | |||
| 924 | d = xs_dict_append(d, "remote_url", href); | 924 | d = xs_dict_append(d, "remote_url", href); |
| 925 | d = xs_dict_append(d, "description", name); | 925 | d = xs_dict_append(d, "description", name); |
| 926 | 926 | ||
| 927 | d = xs_dict_append(d, "type", (*type == 'v' || *type == 'V') ? "video" : "image"); | 927 | d = xs_dict_append(d, "type", (*type == 'v' || *type == 'V') ? "video" : |
| 928 | (*type == 'a' || *type == 'A') ? "audio" : "image"); | ||
| 928 | 929 | ||
| 929 | matt = xs_list_append(matt, d); | 930 | matt = xs_list_append(matt, d); |
| 930 | } | 931 | } |