diff options
| author | default <nobody@localhost> | 2025-03-22 08:32:59 +0100 |
|---|---|---|
| committer | default <nobody@localhost> | 2025-03-22 08:32:59 +0100 |
| commit | 20573275ec8f7cc7f5744a3280590040a6f14203 (patch) | |
| tree | a878301e703e163b05bc08ba45acca94d96cc8e5 | |
| parent | d68d2f51df95dde970fbc8972c49276c52d5a7d6 (diff) | |
mastoapi: Added support for /api/v1/instance/peers.
| -rw-r--r-- | mastoapi.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -2256,6 +2256,15 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path, status = HTTP_STATUS_OK; } else + if (strcmp(cmd, "/v1/instance/peers") == 0) { /** **/ + /* get the collected inbox list as the instances "this domain is aware of" */ + xs *list = inbox_list(); + + *body = xs_json_dumps(list, 4); + *ctype = "application/json"; + status = HTTP_STATUS_OK; + } + else if (xs_startswith(cmd, "/v1/statuses/")) { /** **/ /* information about a status */ if (logged_in) { |