diff options
Diffstat (limited to 'mastoapi.c')
| -rw-r--r-- | mastoapi.c | 5 |
1 files changed, 5 insertions, 0 deletions
| @@ -1158,6 +1158,7 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path, | |||
| 1158 | xs *out = xs_list_new(); | 1158 | xs *out = xs_list_new(); |
| 1159 | xs_list *p = l; | 1159 | xs_list *p = l; |
| 1160 | xs_dict *v; | 1160 | xs_dict *v; |
| 1161 | xs_list *excl = xs_dict_get(args, "exclude_types[]"); | ||
| 1161 | 1162 | ||
| 1162 | while (xs_list_iter(&p, &v)) { | 1163 | while (xs_list_iter(&p, &v)) { |
| 1163 | xs *noti = notify_get(&snac1, v); | 1164 | xs *noti = notify_get(&snac1, v); |
| @@ -1194,6 +1195,10 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path, | |||
| 1194 | else | 1195 | else |
| 1195 | continue; | 1196 | continue; |
| 1196 | 1197 | ||
| 1198 | /* excluded type? */ | ||
| 1199 | if (!xs_is_null(excl) && xs_list_in(excl, type) != -1) | ||
| 1200 | continue; | ||
| 1201 | |||
| 1197 | xs *mn = xs_dict_new(); | 1202 | xs *mn = xs_dict_new(); |
| 1198 | 1203 | ||
| 1199 | mn = xs_dict_append(mn, "type", type); | 1204 | mn = xs_dict_append(mn, "type", type); |