diff options
| author | 2025-03-22 08:50:08 +0100 | |
|---|---|---|
| committer | 2025-03-22 08:50:08 +0100 | |
| commit | 770062def6f3e10bf56eae48e274709796fa6df6 (patch) | |
| tree | 9015e954ef06a8c2453a00b3b7d28ab32faafe35 /data.c | |
| parent | mastoapi: fixed instance peers to return only the domains. (diff) | |
| download | snac2-770062def6f3e10bf56eae48e274709796fa6df6.tar.gz snac2-770062def6f3e10bf56eae48e274709796fa6df6.tar.xz snac2-770062def6f3e10bf56eae48e274709796fa6df6.zip | |
Filter out block instances from inbox_list().
Diffstat (limited to 'data.c')
| -rw-r--r-- | data.c | 7 |
1 files changed, 4 insertions, 3 deletions
| @@ -2619,10 +2619,9 @@ xs_list *inbox_list(void) | |||
| 2619 | xs_list *ibl = xs_list_new(); | 2619 | xs_list *ibl = xs_list_new(); |
| 2620 | xs *spec = xs_fmt("%s/inbox/" "*", srv_basedir); | 2620 | xs *spec = xs_fmt("%s/inbox/" "*", srv_basedir); |
| 2621 | xs *files = xs_glob(spec, 0, 0); | 2621 | xs *files = xs_glob(spec, 0, 0); |
| 2622 | xs_list *p = files; | ||
| 2623 | const xs_val *v; | 2622 | const xs_val *v; |
| 2624 | 2623 | ||
| 2625 | while (xs_list_iter(&p, &v)) { | 2624 | xs_list_foreach(files, v) { |
| 2626 | FILE *f; | 2625 | FILE *f; |
| 2627 | 2626 | ||
| 2628 | if ((f = fopen(v, "r")) != NULL) { | 2627 | if ((f = fopen(v, "r")) != NULL) { |
| @@ -2630,7 +2629,9 @@ xs_list *inbox_list(void) | |||
| 2630 | 2629 | ||
| 2631 | if (line && *line) { | 2630 | if (line && *line) { |
| 2632 | line = xs_strip_i(line); | 2631 | line = xs_strip_i(line); |
| 2633 | ibl = xs_list_append(ibl, line); | 2632 | |
| 2633 | if (!is_instance_blocked(line)) | ||
| 2634 | ibl = xs_list_append(ibl, line); | ||
| 2634 | } | 2635 | } |
| 2635 | 2636 | ||
| 2636 | fclose(f); | 2637 | fclose(f); |