diff options
Diffstat (limited to 'mastoapi.c')
| -rw-r--r-- | mastoapi.c | 9 |
1 files changed, 7 insertions, 2 deletions
| @@ -1676,7 +1676,7 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path, | |||
| 1676 | else | 1676 | else |
| 1677 | if (strcmp(opt, "statuses") == 0) { /** **/ | 1677 | if (strcmp(opt, "statuses") == 0) { /** **/ |
| 1678 | /* the public list of posts of a user */ | 1678 | /* the public list of posts of a user */ |
| 1679 | xs *timeline = timeline_simple_list(&snac2, "public", 0, 256); | 1679 | xs *timeline = timeline_simple_list(&snac2, "public", 0, 256, NULL); |
| 1680 | xs_list *p = timeline; | 1680 | xs_list *p = timeline; |
| 1681 | const xs_str *v; | 1681 | const xs_str *v; |
| 1682 | 1682 | ||
| @@ -2171,7 +2171,12 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path, | |||
| 2171 | 2171 | ||
| 2172 | { | 2172 | { |
| 2173 | xs *d11 = xs_json_loads("{\"characters_reserved_per_url\":32," | 2173 | xs *d11 = xs_json_loads("{\"characters_reserved_per_url\":32," |
| 2174 | "\"max_characters\":100000,\"max_media_attachments\":8}"); | 2174 | "\"max_characters\":100000,\"max_media_attachments\":4}"); |
| 2175 | |||
| 2176 | const xs_number *max_attachments = xs_dict_get(srv_config, "max_attachments"); | ||
| 2177 | if (xs_type(max_attachments) == XSTYPE_NUMBER) | ||
| 2178 | d11 = xs_dict_set(d11, "max_media_attachments", max_attachments); | ||
| 2179 | |||
| 2175 | cfg = xs_dict_append(cfg, "statuses", d11); | 2180 | cfg = xs_dict_append(cfg, "statuses", d11); |
| 2176 | 2181 | ||
| 2177 | xs *d12 = xs_json_loads("{\"max_featured_tags\":0}"); | 2182 | xs *d12 = xs_json_loads("{\"max_featured_tags\":0}"); |