Skip to content
This repository was archived by the owner on Nov 21, 2020. It is now read-only.

Commit 0cf2c38

Browse files
khangaridbBattulga BatAmar
authored andcommitted
Fixed the engage message's footer loop (#462)
1 parent 058d3dd commit 0cf2c38

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/data/resolvers/mutations/engageUtils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,6 @@ const sendViaEmail = async (message: IEngageMessageDocument) => {
133133

134134
const { subject, content, attachments = [] } = message.email.toJSON();
135135

136-
let replacedContent = content;
137-
138136
const AWS_SES_CONFIG_SET = getEnv({ name: 'AWS_SES_CONFIG_SET' });
139137
const AWS_ENDPOINT = getEnv({ name: 'AWS_ENDPOINT' });
140138

@@ -156,6 +154,8 @@ const sendViaEmail = async (message: IEngageMessageDocument) => {
156154
EngageMessages.setCustomerIds(message._id, customers);
157155

158156
for (const customer of customers) {
157+
let replacedContent = content;
158+
159159
// Add unsubscribe link ========
160160
const unSubscribeUrl = `${AWS_ENDPOINT}/unsubscribe/?cid=${customer._id}`;
161161

0 commit comments

Comments
 (0)