Fix XMPP proof url

This commit is contained in:
Yarmo Mackenbach 2020-07-18 20:54:49 +02:00
parent 1488855850
commit 7ffca75db0

View file

@ -537,9 +537,9 @@ async function verifyProof(url, fingerprint) {
output.type = "xmpp"; output.type = "xmpp";
match = url.match(/xmpp:(.*)@(.*)/); match = url.match(/xmpp:(.*)@(.*)/);
output.display = `${match[1]}@${match[2]}`; output.display = `${match[1]}@${match[2]}`;
output.proofUrlFetch = `https://xmpp-vcard.keyoxide.org/api/vcard/${output.display}/DESC`; output.proofUrl = `https://xmpp-vcard.keyoxide.org/api/vcard/${output.display}/DESC`;
try { try {
response = await fetch(output.proofUrlFetch); response = await fetch(output.proofUrl);
if (!response.ok) { if (!response.ok) {
throw new Error('Response failed: ' + response.status); throw new Error('Response failed: ' + response.status);
} }