Skip to content

Commit

Permalink
Merge branch 'develop' into feat/rtl-support
Browse files Browse the repository at this point in the history
  • Loading branch information
iamsivin committed Feb 22, 2023
2 parents 91a592d + 8935933 commit a4972c3
Showing 1 changed file with 10 additions and 8 deletions.
Expand Up @@ -974,15 +974,9 @@ export default {
},
getMessagePayloadForWhatsapp(message) {
const multipleMessagePayload = [];
const messagePayload = {
conversationId: this.currentChat.id,
message,
private: false,
};
multipleMessagePayload.push(messagePayload);
if (this.attachedFiles && this.attachedFiles.length) {
let caption = message;
this.attachedFiles.forEach(attachment => {
const attachedFile = this.globalConfig.directUploadsEnabled
? attachment.blobSignedId
Expand All @@ -991,10 +985,18 @@ export default {
conversationId: this.currentChat.id,
files: [attachedFile],
private: false,
message: '',
message: caption,
};
multipleMessagePayload.push(attachmentPayload);
caption = '';
});
} else {
const messagePayload = {
conversationId: this.currentChat.id,
message,
private: false,
};
multipleMessagePayload.push(messagePayload);
}
return multipleMessagePayload;
Expand Down

0 comments on commit a4972c3

Please sign in to comment.