mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-22 23:09:29 -07:00
Allow Mastodon backlinks to be URLs containing fingerprint
This commit is contained in:
parent
9eebea8405
commit
58b6d37b4f
1 changed files with 2 additions and 1 deletions
|
@ -738,7 +738,8 @@ async function verifyProof(url, fingerprint) {
|
||||||
if ('attachment' in json) {
|
if ('attachment' in json) {
|
||||||
match = url.match(/https:\/\/(.*)\/@(.*)/);
|
match = url.match(/https:\/\/(.*)\/@(.*)/);
|
||||||
json.attachment.forEach((item, i) => {
|
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.type = "fediverse";
|
||||||
output.display = `@${json.preferredUsername}@${[match[1]]}`;
|
output.display = `@${json.preferredUsername}@${[match[1]]}`;
|
||||||
output.proofUrlFetch = json.url;
|
output.proofUrlFetch = json.url;
|
||||||
|
|
Loading…
Reference in a new issue