summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/mastoapi.c b/mastoapi.c
index 7029dfb..fc636a9 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -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) {