feat: support openpgp4fpr in URL

This commit is contained in:
Yarmo Mackenbach 2024-01-23 20:16:48 +01:00
parent a2857d1a3e
commit 9be8cab435
No known key found for this signature in database
GPG key ID: C248C28D432560ED

View file

@ -117,6 +117,7 @@ const generateAutoProfile = async (id) => {
let result
const aspeRe = /aspe:(.*):(.*)/
const openpgpRe = /openpgp4fpr:(.*)/
if (aspeRe.test(id)) {
result = await generateAspeProfile(id)
@ -126,6 +127,15 @@ const generateAutoProfile = async (id) => {
}
}
if (openpgpRe.test(id)) {
const match = id.match(openpgpRe)
result = await generateHKPProfile(match[1])
if (result && !('errors' in result)) {
return result
}
}
if (id.includes('@')) {
result = await generateWKDProfile(id)