mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 13:25:04 +00:00
In the 'ping' cmdline, really resolve via webfinger if necessary.
This commit is contained in:
parent
90c15ea212
commit
f0a032044b
1 changed files with 8 additions and 0 deletions
8
main.c
8
main.c
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue