diff options
| author | shtrophic <christoph@liebender.dev> | 2025-02-15 14:37:36 +0100 |
|---|---|---|
| committer | shtrophic <christoph@liebender.dev> | 2025-02-15 14:37:36 +0100 |
| commit | 7611a6bee4bcbad2f1710aafa99aba730e5cf995 (patch) | |
| tree | 33ab7bee30379e16f6869b2efda5494be8aeb858 /mastoapi.c | |
| parent | 3d96c576287736ebdf87e4a7b956842a6c6e055f (diff) | |
| parent | 3d705b22a67ee913b9bd4473277430bd481cef25 (diff) | |
Merge tag '2.72' into curl-smtp
Version 2.72 RELEASED.
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, else if (strcmp(opt, "statuses") == 0) { /** **/ /* the public list of posts of a user */ - xs *timeline = timeline_simple_list(&snac2, "public", 0, 256); + xs *timeline = timeline_simple_list(&snac2, "public", 0, 256, NULL); xs_list *p = timeline; const xs_str *v; @@ -2171,7 +2171,12 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path, { xs *d11 = xs_json_loads("{\"characters_reserved_per_url\":32," - "\"max_characters\":100000,\"max_media_attachments\":8}"); + "\"max_characters\":100000,\"max_media_attachments\":4}"); + + const xs_number *max_attachments = xs_dict_get(srv_config, "max_attachments"); + if (xs_type(max_attachments) == XSTYPE_NUMBER) + d11 = xs_dict_set(d11, "max_media_attachments", max_attachments); + cfg = xs_dict_append(cfg, "statuses", d11); xs *d12 = xs_json_loads("{\"max_featured_tags\":0}"); |