Output messages are sent with send_to_inbox_raw().

This commit is contained in:
default 2023-02-07 10:33:58 +01:00
parent 3ddf76c2aa
commit 7be01b7f34

View file

@ -1111,16 +1111,20 @@ void process_user_queue_item(snac *snac, xs_dict *q_item)
if (strcmp(type, "output") == 0) { if (strcmp(type, "output") == 0) {
int status; int status;
xs_str *inbox = xs_dict_get(q_item, "inbox"); xs_str *inbox = xs_dict_get(q_item, "inbox");
xs_str *keyid = xs_dict_get(q_item, "keyid");
xs_str *seckey = xs_dict_get(q_item, "seckey");
xs_dict *msg = xs_dict_get(q_item, "message"); xs_dict *msg = xs_dict_get(q_item, "message");
int retries = xs_number_get(xs_dict_get(q_item, "retries")); int retries = xs_number_get(xs_dict_get(q_item, "retries"));
xs *payload = NULL; xs *payload = NULL;
int p_size = 0; int p_size = 0;
if (xs_is_null(inbox) || xs_is_null(msg)) if (xs_is_null(inbox) || xs_is_null(msg) || xs_is_null(keyid) || xs_is_null(seckey)) {
srv_log(xs_fmt("incomplete output message"));
return; return;
}
/* deliver */ /* deliver */
status = send_to_inbox(snac, inbox, msg, &payload, &p_size, retries == 0 ? 3 : 8); status = send_to_inbox_raw(keyid, seckey, inbox, msg, &payload, &p_size, retries == 0 ? 3 : 8);
snac_log(snac, xs_fmt("process_queue sent to inbox %s %d", inbox, status)); snac_log(snac, xs_fmt("process_queue sent to inbox %s %d", inbox, status));