summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mastoapi.c b/mastoapi.c
index 3c445c2..797a4da 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -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}");