diff options
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) | |||
| 1101 | if (strcmp(type, "output") == 0) { | 1101 | if (strcmp(type, "output") == 0) { |
| 1102 | int status; | 1102 | int status; |
| 1103 | char *inbox = xs_dict_get(q_item, "inbox"); | 1103 | char *inbox = xs_dict_get(q_item, "inbox"); |
| 1104 | char *msg = xs_dict_get(q_item, "object"); | 1104 | char *msg = xs_dict_get(q_item, "message"); |
| 1105 | int retries = xs_number_get(xs_dict_get(q_item, "retries")); | 1105 | int retries = xs_number_get(xs_dict_get(q_item, "retries")); |
| 1106 | xs *payload = NULL; | 1106 | xs *payload = NULL; |
| 1107 | int p_size = 0; | 1107 | int p_size = 0; |
| @@ -1132,10 +1132,13 @@ void process_queue(snac *snac) | |||
| 1132 | else | 1132 | else |
| 1133 | if (strcmp(type, "input") == 0) { | 1133 | if (strcmp(type, "input") == 0) { |
| 1134 | /* process the message */ | 1134 | /* process the message */ |
| 1135 | char *msg = xs_dict_get(q_item, "object"); | 1135 | char *msg = xs_dict_get(q_item, "message"); |
| 1136 | char *req = xs_dict_get(q_item, "req"); | 1136 | char *req = xs_dict_get(q_item, "req"); |
| 1137 | int retries = xs_number_get(xs_dict_get(q_item, "retries")); | 1137 | int retries = xs_number_get(xs_dict_get(q_item, "retries")); |
| 1138 | 1138 | ||
| 1139 | if (xs_is_null(msg)) | ||
| 1140 | continue; | ||
| 1141 | |||
| 1139 | if (!process_message(snac, msg, req)) { | 1142 | if (!process_message(snac, msg, req)) { |
| 1140 | if (retries > queue_retry_max) | 1143 | if (retries > queue_retry_max) |
| 1141 | snac_log(snac, xs_fmt("process_queue input giving up")); | 1144 | snac_log(snac, xs_fmt("process_queue input giving up")); |