mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-29 07:53:37 +00:00
Output messages are sent with send_to_inbox_raw().
This commit is contained in:
parent
3ddf76c2aa
commit
7be01b7f34
1 changed files with 11 additions and 7 deletions
|
@ -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));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue