MCPcopy Create free account
hub / github.com/mailvelope/mailvelope / tagToRecipient

Function tagToRecipient

src/components/editor/components/RecipientInput.js:40–54  ·  view source on GitHub ↗
(tag, keys)

Source from the content-addressed store, hash-verified

38}
39
40function tagToRecipient(tag, keys) {
41 if (!tag || !tag.id) {
42 return;
43 }
44 const recipient = {email: tag.id, displayId: tag.id};
45 const key = findKeyByEmail(keys, recipient.email);
46 if (key) {
47 recipient.key = key;
48 recipient.fingerprint = key.fingerprint;
49 } else {
50 recipient.checkServer = true;
51 recipient.lookupPending = true;
52 }
53 return recipient;
54}
55
56export function RecipientInput({extraKey, hideErrorMsg, keys, recipients, onChangeRecipients}) {
57 const idRef = useRef(getUUID());

Callers 1

updateParentRecipientsFunction · 0.85

Calls 1

findKeyByEmailFunction · 0.90

Tested by

no test coverage detected