summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-04-16 07:43:41 +0200
committerdefault <nobody@localhost>2023-04-16 07:43:41 +0200
commit0240c871f306f03d105d2ce9ca101932c014fcbd (patch)
treedb9e1c8d77a60104bae61e155679761cbed01530 /mastoapi.c
parent2ec58144ba58c03e30fa5de936db5323da4fb62e (diff)
New function user_open_by_md5().
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c6
1 files changed, 1 insertions, 5 deletions
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);