diff --git a/activitypub.c b/activitypub.c index 2c20e63..6fb6bf5 100644 --- a/activitypub.c +++ b/activitypub.c @@ -117,7 +117,7 @@ int actor_request(snac *snac, const char *actor, xs_dict **data) *data = NULL; /* get from disk first */ - status = actor_get(snac, actor, data); + status = actor_get(actor, data); if (status != 200) { /* actor data non-existent or stale: get from the net */ diff --git a/data.c b/data.c index d7643e2..73192ba 100644 --- a/data.c +++ b/data.c @@ -1439,20 +1439,12 @@ int actor_add(const char *actor, xs_dict *msg) } -int actor_get(snac *snac1, const char *actor, xs_dict **data) +int actor_get(const char *actor, xs_dict **data) /* returns an already downloaded actor */ { int status = 200; xs_dict *d = NULL; - if (strcmp(actor, snac1->actor) == 0) { - /* this actor */ - if (data) - *data = msg_actor(snac1); - - return status; - } - if (xs_startswith(actor, srv_baseurl)) { /* it's a (possible) local user */ xs *l = xs_split(actor, "/"); diff --git a/html.c b/html.c index 58501f2..5c2c4d7 100644 --- a/html.c +++ b/html.c @@ -188,7 +188,7 @@ xs_str *html_actor_icon(xs_str *os, char *actor, } -xs_str *html_msg_icon(snac *snac, xs_str *os, const xs_dict *msg) +xs_str *html_msg_icon(xs_str *os, const xs_dict *msg) { char *actor_id; xs *actor = NULL; @@ -196,7 +196,7 @@ xs_str *html_msg_icon(snac *snac, xs_str *os, const xs_dict *msg) if ((actor_id = xs_dict_get(msg, "attributedTo")) == NULL) actor_id = xs_dict_get(msg, "actor"); - if (actor_id && valid_status(actor_get(snac, actor_id, &actor))) { + if (actor_id && valid_status(actor_get(actor_id, &actor))) { char *date = NULL; char *udate = NULL; char *url = NULL; @@ -870,7 +870,7 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local, xs *s1 = xs_fmt("