forked from Mirrors/keyoxide-web
Handle user identities without userId or email
This commit is contained in:
parent
2f37a69ba8
commit
f47001a41e
1 changed files with 6 additions and 4 deletions
|
@ -215,11 +215,13 @@ async function displayProfile(opts) {
|
||||||
feedback += `<div class="profileDataItem__value">general information</div>`;
|
feedback += `<div class="profileDataItem__value">general information</div>`;
|
||||||
feedback += `</div>`;
|
feedback += `</div>`;
|
||||||
for (var i = 0; i < keyData.publicKey.users.length; i++) {
|
for (var i = 0; i < keyData.publicKey.users.length; i++) {
|
||||||
|
if (keyData.publicKey.users[i].userId && 'email' in keyData.publicKey.users[i].userId) {
|
||||||
feedback += `<div class="profileDataItem">`;
|
feedback += `<div class="profileDataItem">`;
|
||||||
feedback += `<div class="profileDataItem__label">email</div>`;
|
feedback += `<div class="profileDataItem__label">email</div>`;
|
||||||
feedback += `<div class="profileDataItem__value"><a href="mailto:${keyData.publicKey.users[i].userId.email}">${keyData.publicKey.users[i].userId.email}</a></div>`;
|
feedback += `<div class="profileDataItem__value"><a href="mailto:${keyData.publicKey.users[i].userId.email}">${keyData.publicKey.users[i].userId.email}</a></div>`;
|
||||||
feedback += `</div>`;
|
feedback += `</div>`;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
feedback += `<div class="profileDataItem">`;
|
feedback += `<div class="profileDataItem">`;
|
||||||
feedback += `<div class="profileDataItem__label">fingerprint</div>`;
|
feedback += `<div class="profileDataItem__label">fingerprint</div>`;
|
||||||
feedback += `<div class="profileDataItem__value"><a href="https://keys.openpgp.org/pks/lookup?op=get&options=mr&search=0x${keyData.fingerprint}">${keyData.fingerprint}</a></div>`;
|
feedback += `<div class="profileDataItem__value"><a href="https://keys.openpgp.org/pks/lookup?op=get&options=mr&search=0x${keyData.fingerprint}">${keyData.fingerprint}</a></div>`;
|
||||||
|
|
Loading…
Reference in a new issue