Call actor_get_refresh() from actor_request().

This commit is contained in:
default 2024-03-13 06:30:24 +01:00
parent 262302a3af
commit b2e3841467
2 changed files with 2 additions and 8 deletions

View File

@ -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);

2
data.c
View File

@ -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);