diff options
Diffstat (limited to 'activitypub.c')
| -rw-r--r-- | activitypub.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/activitypub.c b/activitypub.c index 4f0e246..42558f4 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -469,7 +469,7 @@ d_char *msg_admiration(snac *snac, char *object, char *type) | |||
| 469 | /* call the object */ | 469 | /* call the object */ |
| 470 | timeline_request(snac, &object, &wrk); | 470 | timeline_request(snac, &object, &wrk); |
| 471 | 471 | ||
| 472 | if (valid_status(object_get(object, &a_msg, NULL))) { | 472 | if (valid_status(object_get(object, &a_msg))) { |
| 473 | xs *rcpts = xs_list_new(); | 473 | xs *rcpts = xs_list_new(); |
| 474 | 474 | ||
| 475 | msg = msg_base(snac, type, "@dummy", snac->actor, "@now", object); | 475 | msg = msg_base(snac, type, "@dummy", snac->actor, "@now", object); |
| @@ -664,7 +664,7 @@ xs_dict *msg_note(snac *snac, xs_str *content, xs_val *rcpts, xs_str *in_reply_t | |||
| 664 | /* demand this thing */ | 664 | /* demand this thing */ |
| 665 | timeline_request(snac, &in_reply_to, &wrk); | 665 | timeline_request(snac, &in_reply_to, &wrk); |
| 666 | 666 | ||
| 667 | if (valid_status(object_get(in_reply_to, &p_msg, NULL))) { | 667 | if (valid_status(object_get(in_reply_to, &p_msg))) { |
| 668 | /* add this author as recipient */ | 668 | /* add this author as recipient */ |
| 669 | char *a, *v; | 669 | char *a, *v; |
| 670 | 670 | ||
| @@ -977,7 +977,7 @@ int process_input_message(snac *snac, char *msg, char *req) | |||
| 977 | 977 | ||
| 978 | timeline_request(snac, &object, &wrk); | 978 | timeline_request(snac, &object, &wrk); |
| 979 | 979 | ||
| 980 | if (valid_status(object_get(object, &a_msg, NULL))) { | 980 | if (valid_status(object_get(object, &a_msg))) { |
| 981 | char *who = xs_dict_get(a_msg, "attributedTo"); | 981 | char *who = xs_dict_get(a_msg, "attributedTo"); |
| 982 | 982 | ||
| 983 | if (who && !is_muted(snac, who)) { | 983 | if (who && !is_muted(snac, who)) { |
| @@ -1262,7 +1262,7 @@ int activitypub_get_handler(d_char *req, char *q_path, | |||
| 1262 | while (xs_list_iter(&p, &v)) { | 1262 | while (xs_list_iter(&p, &v)) { |
| 1263 | xs *i = NULL; | 1263 | xs *i = NULL; |
| 1264 | 1264 | ||
| 1265 | if (valid_status(object_get_by_md5(v, &i, NULL))) { | 1265 | if (valid_status(object_get_by_md5(v, &i))) { |
| 1266 | char *type = xs_dict_get(i, "type"); | 1266 | char *type = xs_dict_get(i, "type"); |
| 1267 | char *id = xs_dict_get(i, "id"); | 1267 | char *id = xs_dict_get(i, "id"); |
| 1268 | 1268 | ||
| @@ -1287,7 +1287,7 @@ int activitypub_get_handler(d_char *req, char *q_path, | |||
| 1287 | if (xs_startswith(p_path, "p/")) { | 1287 | if (xs_startswith(p_path, "p/")) { |
| 1288 | xs *id = xs_fmt("%s/%s", snac.actor, p_path); | 1288 | xs *id = xs_fmt("%s/%s", snac.actor, p_path); |
| 1289 | 1289 | ||
| 1290 | status = object_get(id, &msg, NULL); | 1290 | status = object_get(id, &msg); |
| 1291 | } | 1291 | } |
| 1292 | else | 1292 | else |
| 1293 | status = 404; | 1293 | status = 404; |