mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 13:25:04 +00:00
Call actor_get_refresh() from actor_request().
This commit is contained in:
parent
262302a3af
commit
b2e3841467
2 changed files with 2 additions and 8 deletions
|
@ -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
2
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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue