summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
authorGravatar default2023-08-12 11:23:01 +0200
committerGravatar default2023-08-12 11:23:01 +0200
commitcac1c6febd0ce90424831b15a9651026b4bb017c (patch)
treeee9e290ef0a51aae2fec42665ef62348e5fc2666 /mastoapi.c
parentRewritten is_msg_public() to not depend on a user. (diff)
downloadsnac2-cac1c6febd0ce90424831b15a9651026b4bb017c.tar.gz
snac2-cac1c6febd0ce90424831b15a9651026b4bb017c.tar.xz
snac2-cac1c6febd0ce90424831b15a9651026b4bb017c.zip
Rewritten actor_get() to not depend on a user.
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mastoapi.c b/mastoapi.c
index 25e54d3..980d900 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -632,7 +632,7 @@ xs_dict *mastoapi_status(snac *snac, const xs_dict *msg)
632/* converts an ActivityPub note to a Mastodon status */ 632/* converts an ActivityPub note to a Mastodon status */
633{ 633{
634 xs *actor = NULL; 634 xs *actor = NULL;
635 actor_get(snac, xs_dict_get(msg, "attributedTo"), &actor); 635 actor_get(xs_dict_get(msg, "attributedTo"), &actor);
636 636
637 /* if the author is not here, discard */ 637 /* if the author is not here, discard */
638 if (actor == NULL) 638 if (actor == NULL)
@@ -1310,7 +1310,7 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
1310 xs *actor = NULL; 1310 xs *actor = NULL;
1311 xs *entry = NULL; 1311 xs *entry = NULL;
1312 1312
1313 if (!valid_status(actor_get(&snac1, xs_dict_get(noti, "actor"), &actor))) 1313 if (!valid_status(actor_get(xs_dict_get(noti, "actor"), &actor)))
1314 continue; 1314 continue;
1315 1315
1316 if (objid != NULL && !valid_status(object_get(objid, &entry))) 1316 if (objid != NULL && !valid_status(object_get(objid, &entry)))