diff options
| author | grunfink <grunfink@comam.es> | 2026-08-30 16:38:58 +0200 |
|---|---|---|
| committer | grunfink <grunfink@comam.es> | 2026-08-30 16:38:58 +0200 |
| commit | 61ef7a86183d7d8f5f6a5fcd6d945b91dcb68526 (patch) | |
| tree | ef5986cad240ee4ad2abd648eecb0217bace8a9f /data.c | |
| parent | 62166d33affa48b625867b246ae1c282fc97035b (diff) | |
Fixed error in notification filtering.
Diffstat (limited to 'data.c')
| -rw-r--r-- | data.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -3576,7 +3576,7 @@ xs_list *notify_list(snac *snac, int skip, int show) } -xs_list *notify_filter_list(snac *snac, xs_list *notifs) +xs_list *notify_filter_list(snac *snac, xs_list *notifs, int skip, int show) /* apply user-defined notification filter to IDs */ { const xs_dict *n_filter = xs_dict_get(snac->config, "notify_filter"); @@ -3633,7 +3633,17 @@ xs_list *notify_filter_list(snac *snac, xs_list *notifs) continue; if (strcmp(type, "Announce") == 0 && !n_ann_on) continue; + + if (skip) { + skip--; + continue; + } + flt = xs_list_append(flt, v); + show--; + + if (show == 0) + break; } return flt; } @@ -3644,7 +3654,7 @@ int notify_new_num(snac *snac) { xs *t = notify_check_time(snac, 0); xs *lst_unfilt = notify_list(snac, 0, XS_ALL); - xs *lst = notify_filter_list(snac, lst_unfilt); + xs *lst = notify_filter_list(snac, lst_unfilt, 0, XS_ALL); int cnt = 0; xs_list *p = lst; |