feat: Support cc and bcc in email replies (#3098)

Co-authored-by: Tejaswini <tejaswini@chatwoot.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Nithin David Thomas 2021-10-11 13:00:48 +05:30 committed by GitHub
parent 0e0632be22
commit 68e697c379
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 135 additions and 25 deletions

View file

@ -8,6 +8,8 @@ export const buildCreatePayload = ({
contentAttributes,
echoId,
file,
ccEmails,
bccEmails,
}) => {
let payload;
if (file) {
@ -18,12 +20,16 @@ export const buildCreatePayload = ({
}
payload.append('private', isPrivate);
payload.append('echo_id', echoId);
payload.append('cc_emails', ccEmails);
payload.append('bcc_emails', bccEmails);
} else {
payload = {
content: message,
private: isPrivate,
echo_id: echoId,
content_attributes: contentAttributes,
cc_emails: ccEmails,
bcc_emails: bccEmails,
};
}
return payload;
@ -41,6 +47,8 @@ class MessageApi extends ApiClient {
contentAttributes,
echo_id: echoId,
file,
ccEmails,
bccEmails,
}) {
return axios({
method: 'post',
@ -51,6 +59,8 @@ class MessageApi extends ApiClient {
contentAttributes,
echoId,
file,
ccEmails,
bccEmails,
}),
});
}