diff options
| author | 2024-03-13 06:30:24 +0100 | |
|---|---|---|
| committer | 2024-03-13 06:30:24 +0100 | |
| commit | b2e384146716286ad451be1097e1eece44d466b2 (patch) | |
| tree | fa10a6133b5859a3579e63d899d764b8d8ccc13c /activitypub.c | |
| parent | Don't call enqueue_actor_refresh() with a NULL user. (diff) | |
| download | snac2-b2e384146716286ad451be1097e1eece44d466b2.tar.gz snac2-b2e384146716286ad451be1097e1eece44d466b2.tar.xz snac2-b2e384146716286ad451be1097e1eece44d466b2.zip | |
Call actor_get_refresh() from actor_request().
Diffstat (limited to 'activitypub.c')
| -rw-r--r-- | activitypub.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/activitypub.c b/activitypub.c index e72a982..fae0c15 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -125,14 +125,8 @@ int actor_request(snac *user, const char *actor, xs_dict **data) | |||
| 125 | *data = NULL; | 125 | *data = NULL; |
| 126 | 126 | ||
| 127 | /* get from disk first */ | 127 | /* get from disk first */ |
| 128 | status = actor_get(actor, data); | 128 | status = actor_get_refresh(user, actor, data); |
| 129 | 129 | ||
| 130 | if (status == 205) { | ||
| 131 | /* stale actor: use it, but request a refresh */ | ||
| 132 | if (user && !xs_startswith(actor, srv_baseurl)) | ||
| 133 | enqueue_actor_refresh(user, actor); | ||
| 134 | } | ||
| 135 | else | ||
| 136 | if (!valid_status(status)) { | 130 | if (!valid_status(status)) { |
| 137 | /* actor data non-existent: get from the net */ | 131 | /* actor data non-existent: get from the net */ |
| 138 | status = activitypub_request(user, actor, &payload); | 132 | status = activitypub_request(user, actor, &payload); |