From b2e384146716286ad451be1097e1eece44d466b2 Mon Sep 17 00:00:00 2001 From: default Date: Wed, 13 Mar 2024 06:30:24 +0100 Subject: [PATCH] Call actor_get_refresh() from actor_request(). --- activitypub.c | 8 +------- data.c | 2 +- 2 files changed, 2 insertions(+), 8 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) *data = NULL; /* get from disk first */ - status = actor_get(actor, data); + status = actor_get_refresh(user, actor, data); - if (status == 205) { - /* stale actor: use it, but request a refresh */ - if (user && !xs_startswith(actor, srv_baseurl)) - enqueue_actor_refresh(user, actor); - } - else if (!valid_status(status)) { /* actor data non-existent: get from the net */ status = activitypub_request(user, actor, &payload); diff --git a/data.c b/data.c index 9b1c55b..83e1b15 100644 --- a/data.c +++ b/data.c @@ -1592,7 +1592,7 @@ int actor_get(const char *actor, xs_dict **data) int actor_get_refresh(snac *user, const char *actor, xs_dict **data) -/* gets an actor and requests and refresh if it's stale */ +/* gets an actor and requests a refresh if it's stale */ { int status = actor_get(actor, data);