diff options
| author | 2023-08-12 11:23:01 +0200 | |
|---|---|---|
| committer | 2023-08-12 11:23:01 +0200 | |
| commit | cac1c6febd0ce90424831b15a9651026b4bb017c (patch) | |
| tree | ee9e290ef0a51aae2fec42665ef62348e5fc2666 /mastoapi.c | |
| parent | Rewritten is_msg_public() to not depend on a user. (diff) | |
| download | snac2-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -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))) |