diff options
| author | 2022-12-02 19:30:59 +0100 | |
|---|---|---|
| committer | 2022-12-02 19:30:59 +0100 | |
| commit | 33c8a73c17667b117f1bb720a5a32c485fd7d130 (patch) | |
| tree | e5d09009501e971af7481e88f21edb161557581d /activitypub.c | |
| parent | Big data storage change. (diff) | |
| download | snac2-33c8a73c17667b117f1bb720a5a32c485fd7d130.tar.gz snac2-33c8a73c17667b117f1bb720a5a32c485fd7d130.tar.xz snac2-33c8a73c17667b117f1bb720a5a32c485fd7d130.zip | |
Fixed RSS and outbox to use the new data storage.
Diffstat (limited to 'activitypub.c')
| -rw-r--r-- | activitypub.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/activitypub.c b/activitypub.c index 8e173c5..8a5dd3c 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -1101,13 +1101,16 @@ int activitypub_get_handler(d_char *req, char *q_path, | |||
| 1101 | 1101 | ||
| 1102 | p = elems; | 1102 | p = elems; |
| 1103 | while (xs_list_iter(&p, &v)) { | 1103 | while (xs_list_iter(&p, &v)) { |
| 1104 | xs *i = timeline_get(&snac, v); | 1104 | xs *i = NULL; |
| 1105 | char *type = xs_dict_get(i, "type"); | ||
| 1106 | char *id = xs_dict_get(i, "id"); | ||
| 1107 | 1105 | ||
| 1108 | if (type && id && strcmp(type, "Note") == 0 && xs_startswith(id, snac.actor)) { | 1106 | if (valid_status(object_get_by_md5(v, &i, NULL))) { |
| 1109 | i = xs_dict_del(i, "_snac"); | 1107 | char *type = xs_dict_get(i, "type"); |
| 1110 | list = xs_list_append(list, i); | 1108 | char *id = xs_dict_get(i, "id"); |
| 1109 | |||
| 1110 | if (type && id && strcmp(type, "Note") == 0 && xs_startswith(id, snac.actor)) { | ||
| 1111 | i = xs_dict_del(i, "_snac"); | ||
| 1112 | list = xs_list_append(list, i); | ||
| 1113 | } | ||
| 1111 | } | 1114 | } |
| 1112 | } | 1115 | } |
| 1113 | 1116 | ||