From 58b6d37b4f67ce3ee14de67e88c93b8e339f8675 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Sun, 6 Sep 2020 18:58:20 +0200 Subject: [PATCH] Allow Mastodon backlinks to be URLs containing fingerprint --- static/scripts.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/scripts.js b/static/scripts.js index 1ff27a5..5a21bd6 100644 --- a/static/scripts.js +++ b/static/scripts.js @@ -738,7 +738,8 @@ async function verifyProof(url, fingerprint) { if ('attachment' in json) { match = url.match(/https:\/\/(.*)\/@(.*)/); json.attachment.forEach((item, i) => { - if (item.value.toUpperCase() === fingerprint.toUpperCase()) { + reVerify = new RegExp(fingerprint, 'i'); + if (reVerify.test(item.value)) { output.type = "fediverse"; output.display = `@${json.preferredUsername}@${[match[1]]}`; output.proofUrlFetch = json.url;