summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-12-10 17:46:54 +0100
committerdefault <nobody@localhost>2023-12-10 17:46:54 +0100
commit0e6c5f9463d7800b40b777af50c6c09ee3d97af2 (patch)
tree590a9a3a6836145e01db0d874f3d6a2967189df4 /activitypub.c
parent8823325bd93afd05370ce175edde90beaaef027e (diff)
actor_request() does not need a user argument.
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/activitypub.c b/activitypub.c
index a852256..ef2dae4 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -115,7 +115,7 @@ int activitypub_request(snac *user, const char *url, xs_dict **data)
}
-int actor_request(snac *user, const char *actor, xs_dict **data)
+int actor_request(const char *actor, xs_dict **data)
/* request an actor */
{
int status, status2;
@@ -129,7 +129,7 @@ int actor_request(snac *user, const char *actor, xs_dict **data)
if (status != 200) {
/* actor data non-existent or stale: get from the net */
- status2 = activitypub_request(user, actor, &payload);
+ status2 = activitypub_request(NULL, actor, &payload);
if (valid_status(status2)) {
/* renew data */
@@ -205,7 +205,7 @@ int timeline_request(snac *snac, char **id, xs_str **wrk, int level)
/* request (and drop) the actor for this entry */
if (!xs_is_null(actor))
- actor_request(snac, actor, NULL);
+ actor_request(actor, NULL);
/* does it have an ancestor? */
char *in_reply_to = xs_dict_get(object, "inReplyTo");
@@ -329,7 +329,7 @@ xs_str *get_actor_inbox(snac *snac, const char *actor)
xs *data = NULL;
char *v = NULL;
- if (valid_status(actor_request(snac, actor, &data))) {
+ if (valid_status(actor_request(actor, &data))) {
/* try first endpoints/sharedInbox */
if ((v = xs_dict_get(data, "endpoints")))
v = xs_dict_get(v, "sharedInbox");
@@ -1093,7 +1093,7 @@ xs_dict *msg_follow(snac *snac, const char *q)
}
/* request the actor */
- status = actor_request(snac, actor, &actor_o);
+ status = actor_request(actor, &actor_o);
if (valid_status(status)) {
/* check if the actor is an alias */
@@ -1499,7 +1499,7 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req)
utype = "(null)";
/* bring the actor */
- a_status = actor_request(snac, actor, &actor_o);
+ a_status = actor_request(actor, &actor_o);
/* do not retry permanent failures */
if (a_status == 404 || a_status == 410 || a_status < 0) {
@@ -1681,7 +1681,7 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req)
/* bring the actor */
xs *who_o = NULL;
- if (valid_status(actor_request(snac, who, &who_o))) {
+ if (valid_status(actor_request(who, &who_o))) {
timeline_admire(snac, object, actor, 0);
snac_log(snac, xs_fmt("new 'Announce' %s %s", actor, object));
do_notify = 1;