From 9be8cab4357014d3b3bd17a4a38e4aa26fb22748 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Tue, 23 Jan 2024 20:16:48 +0100 Subject: [PATCH] feat: support openpgp4fpr in URL --- src/server/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/server/index.js b/src/server/index.js index 3edd263..cb453f4 100644 --- a/src/server/index.js +++ b/src/server/index.js @@ -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)