diff options
| author | 2024-05-05 01:38:22 +0200 | |
|---|---|---|
| committer | 2024-05-05 01:38:22 +0200 | |
| commit | fc76ae4e9e721a1ec5fbcf3b509d5a47cf48cd61 (patch) | |
| tree | b64e7179eacd692896cf9caa5f372854425473a5 /activitypub.c | |
| parent | More Pleroma poll tweaks. (diff) | |
| download | penes-snac2-fc76ae4e9e721a1ec5fbcf3b509d5a47cf48cd61.tar.gz penes-snac2-fc76ae4e9e721a1ec5fbcf3b509d5a47cf48cd61.tar.xz penes-snac2-fc76ae4e9e721a1ec5fbcf3b509d5a47cf48cd61.zip | |
New function enqueue_object_request().
Diffstat (limited to 'activitypub.c')
| -rw-r--r-- | activitypub.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/activitypub.c b/activitypub.c index a8a7db7..bb919ed 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -2313,6 +2313,22 @@ void process_user_queue_item(snac *snac, xs_dict *q_item) | |||
| 2313 | timeline_request_replies(snac, id); | 2313 | timeline_request_replies(snac, id); |
| 2314 | } | 2314 | } |
| 2315 | else | 2315 | else |
| 2316 | if (strcmp(type, "object_request") == 0) { | ||
| 2317 | const char *id = xs_dict_get(q_item, "message"); | ||
| 2318 | |||
| 2319 | if (!xs_is_null(id)) { | ||
| 2320 | int status; | ||
| 2321 | xs *data = NULL; | ||
| 2322 | |||
| 2323 | status = activitypub_request(snac, id, &data); | ||
| 2324 | |||
| 2325 | if (valid_status(status)) | ||
| 2326 | object_add_ow(id, data); | ||
| 2327 | |||
| 2328 | snac_debug(snac, 1, xs_fmt("object_request %s %d", id, status)); | ||
| 2329 | } | ||
| 2330 | } | ||
| 2331 | else | ||
| 2316 | if (strcmp(type, "verify_links") == 0) { | 2332 | if (strcmp(type, "verify_links") == 0) { |
| 2317 | verify_links(snac); | 2333 | verify_links(snac); |
| 2318 | } | 2334 | } |