summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mastoapi.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/mastoapi.c b/mastoapi.c
index bea835c..705a902 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -1504,9 +1504,16 @@ xs_list *mastoapi_account_lists(snac *user, const char *uid)
1504/* returns the list of list an user is in */ 1504/* returns the list of list an user is in */
1505{ 1505{
1506 xs_list *out = xs_list_new(); 1506 xs_list *out = xs_list_new();
1507 xs *actor_md5 = uid ? xs_md5_hex(uid, strlen(uid)) : NULL; 1507 xs *actor_md5 = NULL;
1508 xs *lol = list_maint(user, NULL, 0); 1508 xs *lol = list_maint(user, NULL, 0);
1509 1509
1510 if (uid) {
1511 if (!xs_is_hex(uid))
1512 actor_md5 = xs_md5_hex(uid, strlen(uid));
1513 else
1514 actor_md5 = xs_dup(uid);
1515 }
1516
1510 const xs_list *li; 1517 const xs_list *li;
1511 xs_list_foreach(lol, li) { 1518 xs_list_foreach(lol, li) {
1512 const char *list_id = xs_list_get(li, 0); 1519 const char *list_id = xs_list_get(li, 0);