diff options
author | default <nobody@localhost> | 2023-04-13 17:34:48 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2023-04-13 17:34:48 +0200 |
commit | 1a27e67ed9e4c4b12d9ee4d151c7647043b54647 (patch) | |
tree | ee59fbe612da767a7f21db117d41b711b7a763ad /mastoapi.c | |
parent | 211bedd4978c4711f0e2399b38ccb6e76e39856d (diff) |
New functions notify_get() and notify_list().
Diffstat (limited to 'mastoapi.c')
-rw-r--r-- | mastoapi.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -855,9 +855,15 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path, else if (strcmp(cmd, "/notifications") == 0) { /* TBD */ - *body = xs_dup("[]"); - *ctype = "application/json"; - status = 200; + if (logged_in) { + xs *l = notify_list(&snac1, 0); + + *body = xs_dup("[]"); + *ctype = "application/json"; + status = 200; + } + else + status = 401; } else if (strcmp(cmd, "/filters") == 0) { |