summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-05-31 10:51:37 +0200
committerdefault <nobody@localhost>2023-05-31 10:51:37 +0200
commit96481a38369b937fa4b61655c5efb1c1fd3c8b2a (patch)
tree0102498674357e48405330bac6aeb7d03c074a5c /mastoapi.c
parentdb1bc858a130047cf97f77e41d1d86dc01e30dc2 (diff)
Don't show votes to polls as descendants in mastoapi.
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mastoapi.c b/mastoapi.c
index ccd5773..f86778c 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -1567,8 +1567,10 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
xs *m2 = NULL;
if (valid_status(timeline_get_by_md5(&snac1, v, &m2))) {
- xs *st = mastoapi_status(&snac1, m2);
- des = xs_list_append(des, st);
+ if (xs_is_null(xs_dict_get(m2, "name"))) {
+ xs *st = mastoapi_status(&snac1, m2);
+ des = xs_list_append(des, st);
+ }
}
}