diff options
Diffstat (limited to 'activitypub.c')
| -rw-r--r-- | activitypub.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/activitypub.c b/activitypub.c index 0368ac8..f1c8783 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -2686,6 +2686,19 @@ int process_input_message(snac *snac, const xs_dict *msg, const xs_dict *req) | |||
| 2686 | 2686 | ||
| 2687 | timeline_request(snac, &in_reply_to, &wrk, 0); | 2687 | timeline_request(snac, &in_reply_to, &wrk, 0); |
| 2688 | 2688 | ||
| 2689 | const char *quoted_id = xs_dict_get(object, "quote"); | ||
| 2690 | if (xs_is_string(quoted_id) && xs_match(quoted_id, "https://*|http://*")) { /** **/ | ||
| 2691 | xs *quoted_post = NULL; | ||
| 2692 | int status; | ||
| 2693 | |||
| 2694 | if (valid_status(status = activitypub_request(snac, quoted_id, "ed_post))) { | ||
| 2695 | /* got quoted post */ | ||
| 2696 | object_add(quoted_id, quoted_post); | ||
| 2697 | } | ||
| 2698 | |||
| 2699 | snac_debug(snac, 1, xs_fmt("retrieving quoted post %s %d", quoted_id, status)); | ||
| 2700 | } | ||
| 2701 | |||
| 2689 | if (timeline_add(snac, id, object)) { | 2702 | if (timeline_add(snac, id, object)) { |
| 2690 | snac_log(snac, xs_fmt("new '%s' %s %s", utype, actor, id)); | 2703 | snac_log(snac, xs_fmt("new '%s' %s %s", utype, actor, id)); |
| 2691 | do_notify = 1; | 2704 | do_notify = 1; |