summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mastoapi.c b/mastoapi.c
index 119a715..94912f1 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -569,7 +569,7 @@ static const xs_list *get_collection_items(snac *snac, const char *collection_ur
569 const xs_list *items = NULL; 569 const xs_list *items = NULL;
570 xs_dict *collection = NULL; 570 xs_dict *collection = NULL;
571 571
572 if (activitypub_request(snac, collection_url, &collection) == 200) { 572 if (valid_status(activitypub_request(snac, collection_url, &collection))) {
573 /* check if items are directly embedded */ 573 /* check if items are directly embedded */
574 items = xs_dict_get(collection, "orderedItems"); 574 items = xs_dict_get(collection, "orderedItems");
575 if (xs_is_null(items)) 575 if (xs_is_null(items))
@@ -586,7 +586,7 @@ static const xs_list *get_collection_items(snac *snac, const char *collection_ur
586 const char *first_url = xs_dict_get(collection, "first"); 586 const char *first_url = xs_dict_get(collection, "first");
587 if (!xs_is_null(first_url)) { 587 if (!xs_is_null(first_url)) {
588 xs_dict *first_page = NULL; 588 xs_dict *first_page = NULL;
589 if (activitypub_request(snac, first_url, &first_page) == 200) { 589 if (valid_status(activitypub_request(snac, first_url, &first_page))) {
590 items = xs_dict_get(first_page, "orderedItems"); 590 items = xs_dict_get(first_page, "orderedItems");
591 if (xs_is_null(items)) 591 if (xs_is_null(items))
592 items = xs_dict_get(first_page, "items"); 592 items = xs_dict_get(first_page, "items");