summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-03-06 18:13:16 +0100
committerdefault <nobody@localhost>2024-03-06 18:13:16 +0100
commitc28ab1e72bf53034e8cf72aef4415dea6c722d3a (patch)
treea207b04e933f87850b46b19f195f18fa7db8915e /mastoapi.c
parentea4dd9bed79a517ff38aca4a845194e1dd9a715e (diff)
mastoapi: Added a dummy streaming_api URL.
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mastoapi.c b/mastoapi.c
index 4b23584..685c644 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -1801,7 +1801,11 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
xs *l1 = xs_list_append(xs_list_new(), "en");
ins = xs_dict_append(ins, "languages", l1);
- ins = xs_dict_append(ins, "urls", xs_stock_dict);
+ xs *wss = xs_fmt("wss:/" "/%s", xs_dict_get(srv_config, "host"));
+ xs *urls = xs_dict_new();
+ urls = xs_dict_append(urls, "streaming_api", wss);
+
+ ins = xs_dict_append(ins, "urls", urls);
xs *d2 = xs_dict_append(xs_dict_new(), "user_count", xs_stock_0);
d2 = xs_dict_append(d2, "status_count", xs_stock_0);