summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authorGravatar default2023-04-14 19:39:31 +0200
committerGravatar default2023-04-14 19:39:31 +0200
commit9e7a77c10f0bf3e4d9c99ff8c188476ca9c62a92 (patch)
tree80ec39655d24a8a175852de671ff300f238c52a4 /data.c
parentSet the timeline check time after showing the notifications. (diff)
downloadsnac2-9e7a77c10f0bf3e4d9c99ff8c188476ca9c62a92.tar.gz
snac2-9e7a77c10f0bf3e4d9c99ff8c188476ca9c62a92.tar.xz
snac2-9e7a77c10f0bf3e4d9c99ff8c188476ca9c62a92.zip
New mastoapi to clear all notifications.
Diffstat (limited to 'data.c')
-rw-r--r--data.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/data.c b/data.c
index 9f2e462..4e5696e 100644
--- a/data.c
+++ b/data.c
@@ -1595,6 +1595,19 @@ xs_list *notify_list(snac *snac, int new_only)
1595} 1595}
1596 1596
1597 1597
1598void notify_clear(snac *snac)
1599/* clears all notifications */
1600{
1601 xs *spec = xs_fmt("%s/notify/" "*", snac->basedir);
1602 xs *lst = xs_glob(spec, 0, 0);
1603 xs_list *p = lst;
1604 xs_str *v;
1605
1606 while (xs_list_iter(&p, &v))
1607 unlink(v);
1608}
1609
1610
1598/** the queue **/ 1611/** the queue **/
1599 1612
1600static xs_dict *_enqueue_put(const char *fn, xs_dict *msg) 1613static xs_dict *_enqueue_put(const char *fn, xs_dict *msg)