diff options
| author | default <nobody@localhost> | 2025-02-07 09:41:31 +0100 |
|---|---|---|
| committer | default <nobody@localhost> | 2025-02-07 09:41:31 +0100 |
| commit | 1787102870161914fa7ba19d16803ebf7050b7dd (patch) | |
| tree | 8c592d2cfb693822b6d67a597fbef67f353fd2a8 | |
| parent | cfe73e119da9783e0dab52860298e5dfe8ff63a6 (diff) | |
mastoapi: notify the maximum configured attachments.
| -rw-r--r-- | mastoapi.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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}"); |