From 492d8ba736e7f35420424bf4f70c7fdd310f4015 Mon Sep 17 00:00:00 2001 From: Damyan Mitev <damyan.mitev@vereign.com> Date: Wed, 11 Dec 2019 20:00:45 +0200 Subject: [PATCH] add emailService to VCardAttributes --- javascript/src/iframe/viamapi-iframe.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/javascript/src/iframe/viamapi-iframe.js b/javascript/src/iframe/viamapi-iframe.js index 218922d..33693dd 100644 --- a/javascript/src/iframe/viamapi-iframe.js +++ b/javascript/src/iframe/viamapi-iframe.js @@ -1410,6 +1410,9 @@ const connection = Penpal.connectToParent({ return encodeResponse("200", "", "Document signed"); }, // passportUUID - String - passport to sign the vCard + // senderEmail - the email address of the sender + // attribs - additional attributes, to be added to the vCard. Recognized attribs are: + // - emailService: "GMail", "Outlook 365", ... // text, html - String - the text and html part of the email, both optional // parts - array of objects, representing the MIME structure in format: // { @@ -1421,7 +1424,7 @@ const connection = Penpal.connectToParent({ // body: String if it is a text part (Content-Type = "text/...") or Uint8Array otherwise; filled for leaf MIME nodes // parts: array of instances of the same object; filled for container MIME nodes (Content-Type = "multipart/...") // } - signVCard: async (passportUUID, senderEmail, text, html, parts = null) => { + signVCard: async (passportUUID, senderEmail, attribs, text, html, parts = null) => { const authenticationPublicKey = localStorage.getItem( "authenticatedIdentity" ); @@ -1437,8 +1440,9 @@ const connection = Penpal.connectToParent({ const messageUUID = makeid(); const vCardAttribs = { - passportUUID: passportUUID, - messageUUID: messageUUID + ...attribs, + passportUUID, + messageUUID }; let vCardImageData; -- GitLab