From bd5ff7a8bfdbc1687e60713b654326b531e8f7a2 Mon Sep 17 00:00:00 2001 From: Muhsin Keloth Date: Fri, 31 Mar 2023 18:49:31 +0530 Subject: [PATCH] fix: Agent avatar instead of bot avatar in pending message (#6777) Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> --- .../components/widgets/conversation/ReplyBox.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue b/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue index c33dc208f..b9608a037 100644 --- a/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue +++ b/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue @@ -336,6 +336,12 @@ export default { this.message.length > this.maxLength ); }, + sender() { + return { + name: this.currentUser.name, + thumbnail: this.currentUser.avatar_url, + }; + }, conversationType() { const { additional_attributes: additionalAttributes } = this.currentChat; const type = additionalAttributes ? additionalAttributes.type : ''; @@ -996,6 +1002,7 @@ export default { files: [attachedFile], private: false, message: caption, + sender: this.sender, }; multipleMessagePayload.push(attachmentPayload); caption = ''; @@ -1005,6 +1012,7 @@ export default { conversationId: this.currentChat.id, message, private: false, + sender: this.sender, }; multipleMessagePayload.push(messagePayload); } @@ -1016,6 +1024,7 @@ export default { conversationId: this.currentChat.id, message, private: this.isPrivate, + sender: this.sender, }; if (this.inReplyTo) {