summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
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)
}
+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)