-
Notifications
You must be signed in to change notification settings - Fork 53
Description
- remove unused code + refactor
unrelated to this issue, but I just noticed
// when requested from the content script, `getResponseHeader` will be missing because it's not a real XMLHttpRequest we are getting back
// because it had to go through background scripts, and objects are serialized when this happens
// the proper fix would be to send back headers from bg along with response text, and parse it here
if (!r.getResponseHeader) {
return { pubkey: r.responseText };
}This can be removed, no longer fulfills any function. Also Attester.doLookup attribute should be email instead of emailOrFingerprint
lookupEmail(anddoLookup) should return a list of public keys
the response from API may contain more than one armored public key block. They are concatenated by \n.
Since more than one armored block can be returned, you need to parse them apart with MsgBlockParser.detectBlocks if you get a http 200, then filter only public key blocks from the parsed blocks, and then return the resulting contents as an array of strings in PubkeysSearchResult
For a test, add another email address to attester-endpoints where it returns [pubkey1, pubkey2].join('\n'), then look that up with browser extension compose, and check that both pubkeys were imported.