diff options
author | default <nobody@localhost> | 2022-09-22 11:28:13 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2022-09-22 11:28:13 +0200 |
commit | f2e4de7f9046533795b54a5930b4186506f538e0 (patch) | |
tree | cfaf4f35dc63e54b6018982e64909b26489f67b8 /main.c | |
parent | 00a89295817dd9dc1b29f1718e1efeaa57ea5900 (diff) |
More webfinger work.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -18,6 +18,7 @@ int main(int argc, char *argv[]) { char *cmd; char *basedir; + char *user; int argi = 1; argc--; @@ -45,6 +46,27 @@ int main(int argc, char *argv[]) return 0; } + if (argc < argi) + return usage(); + + user = argv[argi++]; + + if (strcmp(cmd, "webfinger") == 0) { + xs *actor = NULL; + xs *uid = NULL; + int status; + + webfinger_request(user, &status, &actor, &uid); + + printf("status: %d\n", status); + if (actor != NULL) + printf("actor: %s\n", actor); + if (uid != NULL) + printf("uid: %s\n", uid); + + return 0; + } + return 0; } |