diff options
author | default <nobody@localhost> | 2024-03-24 06:15:53 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2024-03-24 06:15:53 +0100 |
commit | f0a032044bc4da3d5baa3188c76f37d6f3cc1038 (patch) | |
tree | 732c9e65c961103d0c71d328cb6a11746756d867 | |
parent | 90c15ea21216269d9292ea18c638283ce46777e6 (diff) |
In the 'ping' cmdline, really resolve via webfinger if necessary.
-rw-r--r-- | main.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -361,6 +361,14 @@ int main(int argc, char *argv[]) if (strcmp(cmd, "ping") == 0) { /** **/ xs *actor_o = NULL; + if (!xs_startswith(url, "https:/")) { + /* try to resolve via webfinger */ + if (!valid_status(webfinger_request(url, &url, NULL))) { + srv_log(xs_fmt("cannot resolve %s via webfinger", url)); + return 1; + } + } + if (valid_status(actor_request(&snac, url, &actor_o))) { xs *msg = msg_ping(&snac, url); |