diff options
Diffstat (limited to 'activitypub.c')
| -rw-r--r-- | activitypub.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/activitypub.c b/activitypub.c index 29ce676..99fe498 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -66,8 +66,10 @@ int actor_request(snac *snac, char *actor, d_char **data) | |||
| 66 | /* renew data */ | 66 | /* renew data */ |
| 67 | status = actor_add(snac, actor, payload); | 67 | status = actor_add(snac, actor, payload); |
| 68 | 68 | ||
| 69 | *data = payload; | 69 | if (data != NULL) { |
| 70 | payload = NULL; | 70 | *data = payload; |
| 71 | payload = NULL; | ||
| 72 | } | ||
| 71 | } | 73 | } |
| 72 | 74 | ||
| 73 | return status; | 75 | return status; |
| @@ -88,6 +90,11 @@ int timeline_request(snac *snac, char *id, char *referrer) | |||
| 88 | status = activitypub_request(snac, id, &object); | 90 | status = activitypub_request(snac, id, &object); |
| 89 | 91 | ||
| 90 | if (valid_status(status)) { | 92 | if (valid_status(status)) { |
| 93 | char *actor = xs_dict_get(object, "actor"); | ||
| 94 | |||
| 95 | /* request (and drop) the actor for this entry */ | ||
| 96 | actor_request(snac, actor, NULL); | ||
| 97 | |||
| 91 | /* does it have an ancestor? */ | 98 | /* does it have an ancestor? */ |
| 92 | char *in_reply_to = xs_dict_get(object, "inReplyTo"); | 99 | char *in_reply_to = xs_dict_get(object, "inReplyTo"); |
| 93 | 100 | ||