diff options
| -rw-r--r-- | activitypub.c | 5 | ||||
| -rw-r--r-- | data.c | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/activitypub.c b/activitypub.c index 90ad874..9427bf5 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -1875,6 +1875,11 @@ void process_queue_item(xs_dict *q_item) | |||
| 1875 | return; | 1875 | return; |
| 1876 | } | 1876 | } |
| 1877 | 1877 | ||
| 1878 | if (is_instance_blocked(inbox)) { | ||
| 1879 | srv_debug(0, xs_fmt("discarded output message to blocked instance %s", inbox)); | ||
| 1880 | return; | ||
| 1881 | } | ||
| 1882 | |||
| 1878 | /* deliver */ | 1883 | /* deliver */ |
| 1879 | status = send_to_inbox_raw(keyid, seckey, inbox, msg, &payload, &p_size, retries == 0 ? 3 : 8); | 1884 | status = send_to_inbox_raw(keyid, seckey, inbox, msg, &payload, &p_size, retries == 0 ? 3 : 8); |
| 1880 | 1885 | ||
| @@ -1759,8 +1759,11 @@ void inbox_add_by_actor(const xs_dict *actor) | |||
| 1759 | char *v; | 1759 | char *v; |
| 1760 | 1760 | ||
| 1761 | if (!xs_is_null(v = xs_dict_get(actor, "endpoints")) && | 1761 | if (!xs_is_null(v = xs_dict_get(actor, "endpoints")) && |
| 1762 | !xs_is_null(v = xs_dict_get(v, "sharedInbox"))) | 1762 | !xs_is_null(v = xs_dict_get(v, "sharedInbox"))) { |
| 1763 | inbox_add(v); | 1763 | /* only collect this inbox if its instance is not blocked */ |
| 1764 | if (!is_instance_blocked(v)) | ||
| 1765 | inbox_add(v); | ||
| 1766 | } | ||
| 1764 | } | 1767 | } |
| 1765 | 1768 | ||
| 1766 | 1769 | ||