diff options
author | default <nobody@localhost> | 2023-01-31 20:22:36 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2023-01-31 20:22:36 +0100 |
commit | 94c4790bd7357be754b0f094fba4eb91b12dc132 (patch) | |
tree | 9ec871a83e8393ddf4034d2e49e77c93c56698ae /activitypub.c | |
parent | ba4df29abd2e08d168edff95fff5067c6e3e747f (diff) |
Unified queue message field names.
Diffstat (limited to 'activitypub.c')
-rw-r--r-- | activitypub.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/activitypub.c b/activitypub.c index e52db31..2df5899 100644 --- a/activitypub.c +++ b/activitypub.c @@ -1101,7 +1101,7 @@ void process_queue(snac *snac) if (strcmp(type, "output") == 0) { int status; char *inbox = xs_dict_get(q_item, "inbox"); - char *msg = xs_dict_get(q_item, "object"); + char *msg = xs_dict_get(q_item, "message"); int retries = xs_number_get(xs_dict_get(q_item, "retries")); xs *payload = NULL; int p_size = 0; @@ -1132,10 +1132,13 @@ void process_queue(snac *snac) else if (strcmp(type, "input") == 0) { /* process the message */ - char *msg = xs_dict_get(q_item, "object"); + char *msg = xs_dict_get(q_item, "message"); char *req = xs_dict_get(q_item, "req"); int retries = xs_number_get(xs_dict_get(q_item, "retries")); + if (xs_is_null(msg)) + continue; + if (!process_message(snac, msg, req)) { if (retries > queue_retry_max) snac_log(snac, xs_fmt("process_queue input giving up")); |