Support WKD for profile page

This commit is contained in:
Yarmo Mackenbach 2020-06-28 22:46:03 +02:00
parent caa43ce8af
commit b9fad2f740

View file

@ -582,10 +582,18 @@ if (elFormProofs) {
} }
if (elProfileUid) { if (elProfileUid) {
let profileUid = elProfileUid.innerHTML; let profileUid = elProfileUid.innerHTML, opts, match;
let opts = { if (/.*@.*/.test(profileUid)) {
input: profileUid, match = profileUid.match(/(.*)@(.*)_([a-zA-Z0-9]+)$/);
mode: "hkp" opts = {
input: `${match[1]}@${match[2]}.${match[3]}`,
mode: "wkd"
}
} else {
opts = {
input: profileUid,
mode: "hkp"
}
} }
displayProfile(opts); displayProfile(opts);
} }