From 0240c871f306f03d105d2ce9ca101932c014fcbd Mon Sep 17 00:00:00 2001 From: default Date: Sun, 16 Apr 2023 07:43:41 +0200 Subject: New function user_open_by_md5(). --- mastoapi.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'mastoapi.c') diff --git a/mastoapi.c b/mastoapi.c index d1ae463..7860046 100644 --- a/mastoapi.c +++ b/mastoapi.c @@ -722,12 +722,8 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path, xs *out = NULL; xs *actor = NULL; - /* if uid it's the md5 of this actor, transform into a real uid */ - if (strcmp(uid, snac1.md5) == 0) - uid = xs_dict_get(snac1.config, "uid"); - /* is it a local user? */ - if (user_open(&snac2, uid)) { + if (user_open(&snac2, uid) || user_open_by_md5(&snac2, uid)) { if (opt == NULL) { /* account information */ actor = msg_actor(&snac2); -- cgit v1.2.3