From c1502ca381afa7490f081530c88a01061aad6701 Mon Sep 17 00:00:00 2001 From: green Date: Thu, 24 Apr 2025 16:19:34 +0200 Subject: mastoapi: fix md5 issues --- mastoapi.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'mastoapi.c') 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); -- cgit v1.2.3