summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/mastoapi.c b/mastoapi.c
index f9141d0..d07d012 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -1290,6 +1290,19 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path,
else
status = 401;
}
+ else
+ if (strcmp(cmd, "/notifications/clear") == 0) {
+ if (logged_in) {
+ notify_clear(&snac);
+ timeline_touch(&snac);
+
+ *body = xs_dup("{}");
+ *ctype = "application/json";
+ status = 200;
+ }
+ else
+ status = 401;
+ }
/* user cleanup */
if (logged_in)