From ba4d848acc9ac2f9c4c38a677b53c8777beb3ef0 Mon Sep 17 00:00:00 2001 From: Ricardo Espinoza Date: Fri, 19 Mar 2021 12:35:38 -0400 Subject: [PATCH] :bug: Map CC addresses correctly (AWS SES) (#1559) --- .../nodes-base/nodes/Aws/SES/AwsSes.node.ts | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/packages/nodes-base/nodes/Aws/SES/AwsSes.node.ts b/packages/nodes-base/nodes/Aws/SES/AwsSes.node.ts index a60b488ef8..58d77eb18c 100644 --- a/packages/nodes-base/nodes/Aws/SES/AwsSes.node.ts +++ b/packages/nodes-base/nodes/Aws/SES/AwsSes.node.ts @@ -1125,15 +1125,9 @@ export class AwsSes implements INodeType { setParameter(params, 'Destination.BccAddresses.member', additionalFields.bccAddresses as string[]); } - if (additionalFields.ccAddressesUi) { - let ccAddresses = (additionalFields.ccAddressesUi as IDataObject).ccAddressesValues as string[]; - //@ts-ignore - ccAddresses = ccAddresses.map(o => o.address); - if (ccAddresses) { - setParameter(params, 'Destination.CcAddresses.member', ccAddresses); - } + if (additionalFields.ccAddresses) { + setParameter(params, 'Destination.CcAddresses.member', additionalFields.ccAddresses as string[]); } - responseData = await awsApiRequestSOAP.call(this, 'email', 'POST', '/?Action=SendEmail&' + params.join('&')); } @@ -1184,13 +1178,8 @@ export class AwsSes implements INodeType { setParameter(params, 'Destination.BccAddresses.member', additionalFields.bccAddresses as string[]); } - if (additionalFields.ccAddressesUi) { - let ccAddresses = (additionalFields.ccAddressesUi as IDataObject).ccAddressesValues as string[]; - //@ts-ignore - ccAddresses = ccAddresses.map(o => o.address); - if (ccAddresses) { - setParameter(params, 'Destination.CcAddresses.member', ccAddresses); - } + if (additionalFields.ccAddresses) { + setParameter(params, 'Destination.CcAddresses.member', additionalFields.ccAddresses as string[]); } if (templateDataUi) {