mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-12-26 01:03:37 +00:00
Discard output messages to blocked instances.
This commit is contained in:
parent
4e87a1106a
commit
073a2d962a
2 changed files with 10 additions and 2 deletions
|
@ -1875,6 +1875,11 @@ void process_queue_item(xs_dict *q_item)
|
|||
return;
|
||||
}
|
||||
|
||||
if (is_instance_blocked(inbox)) {
|
||||
srv_debug(0, xs_fmt("discarded output message to blocked instance %s", inbox));
|
||||
return;
|
||||
}
|
||||
|
||||
/* deliver */
|
||||
status = send_to_inbox_raw(keyid, seckey, inbox, msg, &payload, &p_size, retries == 0 ? 3 : 8);
|
||||
|
||||
|
|
7
data.c
7
data.c
|
@ -1759,8 +1759,11 @@ void inbox_add_by_actor(const xs_dict *actor)
|
|||
char *v;
|
||||
|
||||
if (!xs_is_null(v = xs_dict_get(actor, "endpoints")) &&
|
||||
!xs_is_null(v = xs_dict_get(v, "sharedInbox")))
|
||||
inbox_add(v);
|
||||
!xs_is_null(v = xs_dict_get(v, "sharedInbox"))) {
|
||||
/* only collect this inbox if its instance is not blocked */
|
||||
if (!is_instance_blocked(v))
|
||||
inbox_add(v);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue