diff options
author | default <nobody@localhost> | 2022-10-01 18:48:05 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2022-10-01 18:48:05 +0200 |
commit | 37925a020e11982ef0c77685f04e9ad85cee749c (patch) | |
tree | 2fad815f4f3d109c34f2371131877085bc236b8f /activitypub.c | |
parent | 2c00c7b0b585867495a505a9daf3ab48aa1dfa0b (diff) |
timeline_request() also triggers an actor_request().
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) /* renew data */ status = actor_add(snac, actor, payload); - *data = payload; - payload = NULL; + if (data != NULL) { + *data = payload; + payload = NULL; + } } return status; @@ -88,6 +90,11 @@ int timeline_request(snac *snac, char *id, char *referrer) status = activitypub_request(snac, id, &object); if (valid_status(status)) { + char *actor = xs_dict_get(object, "actor"); + + /* request (and drop) the actor for this entry */ + actor_request(snac, actor, NULL); + /* does it have an ancestor? */ char *in_reply_to = xs_dict_get(object, "inReplyTo"); |