From d0ca703da2bba7864ed04f72fa16aada9f3108c2 Mon Sep 17 00:00:00 2001 From: iamsivin Date: Tue, 28 Jan 2025 23:31:13 +0530 Subject: [PATCH] chore: Review fix --- .../dashboard/components-next/message/Message.vue | 6 +++--- .../dashboard/components-next/message/provider.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/javascript/dashboard/components-next/message/Message.vue b/app/javascript/dashboard/components-next/message/Message.vue index 1a5cc47eb..150c57f85 100644 --- a/app/javascript/dashboard/components-next/message/Message.vue +++ b/app/javascript/dashboard/components-next/message/Message.vue @@ -173,7 +173,7 @@ const variant = computed(() => { return variants[props.messageType] || MESSAGE_VARIANTS.USER; }); -const isMyMessage = computed(() => { +const isBotOrAgentMessage = computed(() => { if (props.messageType === MESSAGE_TYPES.ACTIVITY) { return false; } @@ -202,7 +202,7 @@ const isMyMessage = computed(() => { * @returns {import('vue').ComputedRef<'left'|'right'|'center'>} The computed orientation */ const orientation = computed(() => { - if (isMyMessage.value) { + if (isBotOrAgentMessage.value) { return ORIENTATION.RIGHT; } @@ -440,7 +440,7 @@ provideMessageContext({ isPrivate: computed(() => props.private), variant, orientation, - isMyMessage, + isBotOrAgentMessage, shouldGroupWithNext, }); diff --git a/app/javascript/dashboard/components-next/message/provider.js b/app/javascript/dashboard/components-next/message/provider.js index f4c501845..c70c04b16 100644 --- a/app/javascript/dashboard/components-next/message/provider.js +++ b/app/javascript/dashboard/components-next/message/provider.js @@ -98,7 +98,7 @@ const MessageControl = Symbol('MessageControl'); * @property {import('vue').Ref} [sender=null] - The sender information * @property {import('vue').ComputedRef} orientation - The visual variant of the message * @property {import('vue').ComputedRef} variant - The visual variant of the message - * @property {import('vue').ComputedRef} isMyMessage - Does the message belong to the current user + * @property {import('vue').ComputedRef} isBotOrAgentMessage - Does the message belong to the bot or agents * @property {import('vue').ComputedRef} isPrivate - Proxy computed value for private * @property {import('vue').ComputedRef} shouldGroupWithNext - Should group with the next message or not, it is differnt from groupWithNext, this has a bypass for a failed message */