mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-09 19:50:26 +03:00
Fixed RSS and outbox to use the new data storage.
This commit is contained in:
parent
c00e3afcdc
commit
33c8a73c17
@ -1101,7 +1101,9 @@ int activitypub_get_handler(d_char *req, char *q_path,
|
||||
|
||||
p = elems;
|
||||
while (xs_list_iter(&p, &v)) {
|
||||
xs *i = timeline_get(&snac, v);
|
||||
xs *i = NULL;
|
||||
|
||||
if (valid_status(object_get_by_md5(v, &i, NULL))) {
|
||||
char *type = xs_dict_get(i, "type");
|
||||
char *id = xs_dict_get(i, "id");
|
||||
|
||||
@ -1110,6 +1112,7 @@ int activitypub_get_handler(d_char *req, char *q_path,
|
||||
list = xs_list_append(list, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* replace the 'orderedItems' with the latest posts */
|
||||
xs *items = xs_number_new(xs_list_len(list));
|
||||
|
6
html.c
6
html.c
@ -1131,7 +1131,11 @@ int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char *
|
||||
|
||||
p = elems;
|
||||
while (xs_list_iter(&p, &v)) {
|
||||
xs *msg = timeline_get(&snac, v);
|
||||
xs *msg = NULL;
|
||||
|
||||
if (!valid_status(object_get_by_md5(v, &msg, NULL)))
|
||||
continue;
|
||||
|
||||
char *id = xs_dict_get(msg, "id");
|
||||
|
||||
if (!xs_startswith(id, snac.actor))
|
||||
|
Loading…
Reference in New Issue
Block a user