diff --git a/activitypub.c b/activitypub.c index 18e270a..28b2427 100644 --- a/activitypub.c +++ b/activitypub.c @@ -130,7 +130,7 @@ int actor_request(snac *user, const char *actor, xs_dict **data) if (status == 205) { /* stale actor: use it, but request a refresh */ if (!xs_startswith(actor, srv_baseurl)) - enqueue_actor_request(user, actor); + enqueue_actor_refresh(user, actor); } else if (!valid_status(status)) { @@ -2249,7 +2249,7 @@ void process_user_queue_item(snac *snac, xs_dict *q_item) verify_links(snac); } else - if (strcmp(type, "actor_request") == 0) { + if (strcmp(type, "actor_refresh") == 0) { const char *actor = xs_dict_get(q_item, "actor"); double mtime = object_mtime(actor); @@ -2263,7 +2263,7 @@ void process_user_queue_item(snac *snac, xs_dict *q_item) else object_touch(actor); - snac_log(snac, xs_fmt("refresh actor %s %d", actor, status)); + snac_log(snac, xs_fmt("actor_refresh %s %d", actor, status)); } } else diff --git a/data.c b/data.c index dc5d323..581fd39 100644 --- a/data.c +++ b/data.c @@ -1597,7 +1597,7 @@ int actor_get_refresh(snac *user, const char *actor, xs_dict **data) int status = actor_get(actor, data); if (status == 205 && user && !xs_startswith(actor, srv_baseurl)) - enqueue_actor_request(user, actor); + enqueue_actor_refresh(user, actor); return status; } @@ -2459,10 +2459,10 @@ void enqueue_verify_links(snac *user) } -void enqueue_actor_request(snac *user, const char *actor) -/* enqueues an actor request */ +void enqueue_actor_refresh(snac *user, const char *actor) +/* enqueues an actor refresh */ { - xs *qmsg = _new_qmsg("actor_request", "", 0); + xs *qmsg = _new_qmsg("actor_refresh", "", 0); char *ntid = xs_dict_get(qmsg, "ntid"); xs *fn = xs_fmt("%s/queue/%s.json", user->basedir, ntid); @@ -2470,7 +2470,7 @@ void enqueue_actor_request(snac *user, const char *actor) qmsg = _enqueue_put(fn, qmsg); - snac_debug(user, 1, xs_fmt("enqueue_actor_request %s", user->actor)); + snac_debug(user, 1, xs_fmt("enqueue_actor_refresh %s", user->actor)); } diff --git a/snac.h b/snac.h index 9451544..10088a3 100644 --- a/snac.h +++ b/snac.h @@ -223,7 +223,7 @@ void enqueue_ntfy(const xs_str *msg, const char *ntfy_server, const char *ntfy_t void enqueue_message(snac *snac, const xs_dict *msg); void enqueue_close_question(snac *user, const char *id, int end_secs); void enqueue_verify_links(snac *user); -void enqueue_actor_request(snac *user, const char *actor); +void enqueue_actor_refresh(snac *user, const char *actor); void enqueue_request_replies(snac *user, const char *id); int was_question_voted(snac *user, const char *id);