diff options
| author | 2023-04-14 19:39:31 +0200 | |
|---|---|---|
| committer | 2023-04-14 19:39:31 +0200 | |
| commit | 9e7a77c10f0bf3e4d9c99ff8c188476ca9c62a92 (patch) | |
| tree | 80ec39655d24a8a175852de671ff300f238c52a4 /data.c | |
| parent | Set the timeline check time after showing the notifications. (diff) | |
| download | snac2-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.c | 13 |
1 files changed, 13 insertions, 0 deletions
| @@ -1595,6 +1595,19 @@ xs_list *notify_list(snac *snac, int new_only) | |||
| 1595 | } | 1595 | } |
| 1596 | 1596 | ||
| 1597 | 1597 | ||
| 1598 | void 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 | ||
| 1600 | static xs_dict *_enqueue_put(const char *fn, xs_dict *msg) | 1613 | static xs_dict *_enqueue_put(const char *fn, xs_dict *msg) |