diff options
author | default <nobody@localhost> | 2023-04-14 19:39:31 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2023-04-14 19:39:31 +0200 |
commit | 9e7a77c10f0bf3e4d9c99ff8c188476ca9c62a92 (patch) | |
tree | 80ec39655d24a8a175852de671ff300f238c52a4 /data.c | |
parent | 58b2a47631363e9d35d8194694483b53ed06b03c (diff) |
New mastoapi to clear all notifications.
Diffstat (limited to 'data.c')
-rw-r--r-- | data.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -1595,6 +1595,19 @@ xs_list *notify_list(snac *snac, int new_only) } +void notify_clear(snac *snac) +/* clears all notifications */ +{ + xs *spec = xs_fmt("%s/notify/" "*", snac->basedir); + xs *lst = xs_glob(spec, 0, 0); + xs_list *p = lst; + xs_str *v; + + while (xs_list_iter(&p, &v)) + unlink(v); +} + + /** the queue **/ static xs_dict *_enqueue_put(const char *fn, xs_dict *msg) |