summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar default2023-02-20 10:02:21 +0100
committerGravatar default2023-02-20 10:02:21 +0100
commit58c01be9961d87be72fcb2391ecf6ed181d993a5 (patch)
treea9cb4466595b8adc803cbb7e1731edd46af32129
parentNew boolean argument 'priv' to msg_note(). (diff)
downloadpenes-snac2-58c01be9961d87be72fcb2391ecf6ed181d993a5.tar.gz
penes-snac2-58c01be9961d87be72fcb2391ecf6ed181d993a5.tar.xz
penes-snac2-58c01be9961d87be72fcb2391ecf6ed181d993a5.zip
Use actor_request() again in get_actor_inbox().
This was faster, but some actors not already here (i.e. some mentions) were not posted.
-rw-r--r--activitypub.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/activitypub.c b/activitypub.c
index 2d84b0e..dd46601 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -194,7 +194,7 @@ d_char *get_actor_inbox(snac *snac, char *actor)
194 xs *data = NULL; 194 xs *data = NULL;
195 char *v = NULL; 195 char *v = NULL;
196 196
197 if (valid_status(actor_get(snac, actor, &data))) { 197 if (valid_status(actor_request(snac, actor, &data))) {
198 /* try first endpoints/sharedInbox */ 198 /* try first endpoints/sharedInbox */
199 if ((v = xs_dict_get(data, "endpoints"))) 199 if ((v = xs_dict_get(data, "endpoints")))
200 v = xs_dict_get(v, "sharedInbox"); 200 v = xs_dict_get(v, "sharedInbox");
@@ -281,6 +281,8 @@ d_char *inbox_list(snac *snac, char *msg)
281 /* add the inbox if it's not already there */ 281 /* add the inbox if it's not already there */
282 xs_set_add(&inboxes, inbox); 282 xs_set_add(&inboxes, inbox);
283 } 283 }
284 else
285 snac_log(snac, xs_fmt("cannot find inbox for %s", v));
284 } 286 }
285 287
286 return xs_set_result(&inboxes); 288 return xs_set_result(&inboxes);