diff options
| author | green <dandelions@disroot.org> | 2025-04-24 16:19:34 +0200 |
|---|---|---|
| committer | green <dandelions@disroot.org> | 2025-04-26 02:37:13 +0200 |
| commit | c1502ca381afa7490f081530c88a01061aad6701 (patch) | |
| tree | fa880d2e26ddf455a91ef302b0754c284dfb499a | |
| parent | ec21e1596ab285813d5774224dfed77cbb30d23e (diff) | |
mastoapi: fix md5 issues
| -rw-r--r-- | mastoapi.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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); |