mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-11-03 20:48:07 +00:00 
			
		
		
		
	feat: Add support for Whatsapp template messages in the UI (#4711)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
		@@ -10,6 +10,7 @@ export const buildCreatePayload = ({
 | 
			
		||||
  files,
 | 
			
		||||
  ccEmails = '',
 | 
			
		||||
  bccEmails = '',
 | 
			
		||||
  templateParams,
 | 
			
		||||
}) => {
 | 
			
		||||
  let payload;
 | 
			
		||||
  if (files && files.length !== 0) {
 | 
			
		||||
@@ -32,6 +33,7 @@ export const buildCreatePayload = ({
 | 
			
		||||
      content_attributes: contentAttributes,
 | 
			
		||||
      cc_emails: ccEmails,
 | 
			
		||||
      bcc_emails: bccEmails,
 | 
			
		||||
      template_params: templateParams,
 | 
			
		||||
    };
 | 
			
		||||
  }
 | 
			
		||||
  return payload;
 | 
			
		||||
@@ -51,6 +53,7 @@ class MessageApi extends ApiClient {
 | 
			
		||||
    files,
 | 
			
		||||
    ccEmails = '',
 | 
			
		||||
    bccEmails = '',
 | 
			
		||||
    templateParams,
 | 
			
		||||
  }) {
 | 
			
		||||
    return axios({
 | 
			
		||||
      method: 'post',
 | 
			
		||||
@@ -63,6 +66,7 @@ class MessageApi extends ApiClient {
 | 
			
		||||
        files,
 | 
			
		||||
        ccEmails,
 | 
			
		||||
        bccEmails,
 | 
			
		||||
        templateParams,
 | 
			
		||||
      }),
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user