diff options
| author | 2022-09-28 04:52:17 +0200 | |
|---|---|---|
| committer | 2022-09-28 04:52:17 +0200 | |
| commit | 03b0e105b575bc88b4d271a9bc12e4a68e7aca4b (patch) | |
| tree | 99572f89f01a697fa5306e80fa195206bca73d4f /activitypub.c | |
| parent | The outbox returns now some entries. (diff) | |
| download | snac2-03b0e105b575bc88b4d271a9bc12e4a68e7aca4b.tar.gz snac2-03b0e105b575bc88b4d271a9bc12e4a68e7aca4b.tar.xz snac2-03b0e105b575bc88b4d271a9bc12e4a68e7aca4b.zip | |
Delete the _snac field in outbox.
Diffstat (limited to 'activitypub.c')
| -rw-r--r-- | activitypub.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/activitypub.c b/activitypub.c index 8a38257..2020caf 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -761,7 +761,7 @@ int activitypub_get_handler(d_char *req, char *q_path, | |||
| 761 | else | 761 | else |
| 762 | if (strcmp(p_path, "outbox") == 0) { | 762 | if (strcmp(p_path, "outbox") == 0) { |
| 763 | xs *id = xs_fmt("%s/outbox", snac.actor); | 763 | xs *id = xs_fmt("%s/outbox", snac.actor); |
| 764 | xs *elems = local_list(&snac, 40); | 764 | xs *elems = local_list(&snac, 20); |
| 765 | xs *list = xs_list_new(); | 765 | xs *list = xs_list_new(); |
| 766 | msg = msg_collection(&snac, id); | 766 | msg = msg_collection(&snac, id); |
| 767 | char *p, *v; | 767 | char *p, *v; |
| @@ -772,8 +772,10 @@ int activitypub_get_handler(d_char *req, char *q_path, | |||
| 772 | char *type = xs_dict_get(i, "type"); | 772 | char *type = xs_dict_get(i, "type"); |
| 773 | char *id = xs_dict_get(i, "id"); | 773 | char *id = xs_dict_get(i, "id"); |
| 774 | 774 | ||
| 775 | if (type && id && strcmp(type, "Note") == 0 && xs_startswith(id, snac.actor)) | 775 | if (type && id && strcmp(type, "Note") == 0 && xs_startswith(id, snac.actor)) { |
| 776 | i = xs_dict_del(i, "_snac"); | ||
| 776 | list = xs_list_append(list, i); | 777 | list = xs_list_append(list, i); |
| 778 | } | ||
| 777 | } | 779 | } |
| 778 | 780 | ||
| 779 | /* replace the 'orderedItems' with the latest posts */ | 781 | /* replace the 'orderedItems' with the latest posts */ |