mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-09 19:50:26 +03:00
Added support from exclude notification types.
This commit is contained in:
parent
9c4e491497
commit
6d82dde0c5
@ -1158,6 +1158,7 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
|
||||
xs *out = xs_list_new();
|
||||
xs_list *p = l;
|
||||
xs_dict *v;
|
||||
xs_list *excl = xs_dict_get(args, "exclude_types[]");
|
||||
|
||||
while (xs_list_iter(&p, &v)) {
|
||||
xs *noti = notify_get(&snac1, v);
|
||||
@ -1194,6 +1195,10 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
|
||||
else
|
||||
continue;
|
||||
|
||||
/* excluded type? */
|
||||
if (!xs_is_null(excl) && xs_list_in(excl, type) != -1)
|
||||
continue;
|
||||
|
||||
xs *mn = xs_dict_new();
|
||||
|
||||
mn = xs_dict_append(mn, "type", type);
|
||||
|
Loading…
Reference in New Issue
Block a user