summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar default2023-04-24 16:35:45 +0200
committerGravatar default2023-04-24 16:35:45 +0200
commit3d20adc8406cb1132f035ce0eb54a160ff2882eb (patch)
treed7a14370a6ff17cfe0e44e2e4d7121ab5753d536
parentAdded snac limits (no real limits) to the Instance object. (diff)
downloadsnac2-3d20adc8406cb1132f035ce0eb54a160ff2882eb.tar.gz
snac2-3d20adc8406cb1132f035ce0eb54a160ff2882eb.tar.xz
snac2-3d20adc8406cb1132f035ce0eb54a160ff2882eb.zip
Added some more Instance values.
-rw-r--r--mastoapi.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/mastoapi.c b/mastoapi.c
index 96ab2d4..1b34187 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -1159,6 +1159,25 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
1159 cfg = xs_dict_append(cfg, "statuses", d11); 1159 cfg = xs_dict_append(cfg, "statuses", d11);
1160 } 1160 }
1161 1161
1162 {
1163 xs *d11 = xs_dict_new();
1164 xs *mt = xs_list_new();
1165
1166 mt = xs_list_append(mt, "image/jpeg");
1167 mt = xs_list_append(mt, "image/png");
1168 mt = xs_list_append(mt, "image/gif");
1169
1170 d11 = xs_dict_append(d11, "supported_mime_types", mt);
1171
1172 d11 = xs_dict_append(d11, "image_size_limit", z);
1173 d11 = xs_dict_append(d11, "image_matrix_limit", z);
1174 d11 = xs_dict_append(d11, "video_size_limit", z);
1175 d11 = xs_dict_append(d11, "video_matrix_limit", z);
1176 d11 = xs_dict_append(d11, "video_frame_rate_limit", z);
1177
1178 cfg = xs_dict_append(cfg, "media_attachments", d11);
1179 }
1180
1162 ins = xs_dict_append(ins, "configuration", cfg); 1181 ins = xs_dict_append(ins, "configuration", cfg);
1163 1182
1164 *body = xs_json_dumps_pp(ins, 4); 1183 *body = xs_json_dumps_pp(ins, 4);