oops
This commit is contained in:
parent
ec27da906b
commit
40a6050329
1 changed files with 2 additions and 2 deletions
|
@ -40,12 +40,12 @@ async function verify() {
|
|||
|
||||
// webfinger domain delegation
|
||||
const domain = await fetch(`https://${instance}/.well-known/webfinger?resource=acct:${username}@${instance}`).catch(n);
|
||||
if (domain == null) return null;
|
||||
if (domain == null || !domain.ok) return null;
|
||||
const domain_json = (await domain.json());
|
||||
const domain_url = new URL(domain_json.links.find(x=>x.type=="application/activity+json").href).hostname;
|
||||
|
||||
const user_req = await fetch(`https://${domain_url}/api/v1/accounts/lookup?acct=${username}`).catch(n);
|
||||
if (user_req == null) return null;
|
||||
if (user_req == null || !domain.ok) return null;
|
||||
const user_json = await user_req.json();
|
||||
|
||||
return {
|
||||
|
|
Loading…
Reference in a new issue