summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-05-11 10:44:27 +0200
committerdefault <nobody@localhost>2023-05-11 10:44:27 +0200
commit2a073116d3920e6fe5a9fcba2215a7fd903e0c60 (patch)
treea5150fe9ec0b5afe0584979e2320845e3a6c6d83 /mastoapi.c
parent2a7f5f7b4df96cc885808d9a4079da76860833c7 (diff)
In /relationship, the id[] can be a list.
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mastoapi.c b/mastoapi.c
index fe46b23..876e63c 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -931,6 +931,9 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
const char *md5 = xs_dict_get(args, "id[]");
if (!xs_is_null(md5)) {
+ if (xs_type(md5) == XSTYPE_LIST)
+ md5 = xs_list_get(md5, 0);
+
xs *rel = mastoapi_relationship(&snac1, md5);
if (rel != NULL)