aboutsummaryrefslogtreecommitdiff
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)
/* returns the list of list an user is in */
{
xs_list *out = xs_list_new();
- xs *actor_md5 = uid ? xs_md5_hex(uid, strlen(uid)) : NULL;
+ xs *actor_md5 = NULL;
xs *lol = list_maint(user, NULL, 0);
+ if (uid) {
+ if (!xs_is_hex(uid))
+ actor_md5 = xs_md5_hex(uid, strlen(uid));
+ else
+ actor_md5 = xs_dup(uid);
+ }
+
const xs_list *li;
xs_list_foreach(lol, li) {
const char *list_id = xs_list_get(li, 0);