From 1ccfb4e3dba89e03905890f574809fc97e809699 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Thu, 16 Jan 2025 15:49:48 +0530 Subject: [PATCH] fix: sentry issues (#10695) 1. Ensure audio player ref is accessible before triggering calls ([Sentry](https://chatwoot-p3.sentry.io/issues/6221981610)) 2. Use correct default for attachments, this was incorrectly set to `null` in a previous PR ([Sentry](https://chatwoot-p3.sentry.io/issues/5966738120)) 3. Fix `lastNonActivityMessage` is not present ([Sentry](https://chatwoot-p3.sentry.io/issues/6116038455)) 4. Fix `Alt+J` & `Alt+K` shortcuts not working ([Sentry](https://chatwoot-p3.sentry.io/issues/6075125384)) --------- Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> --- .../Conversation/ConversationCard/CardMessagePreview.vue | 2 +- .../ConversationCard/CardMessagePreviewWithMeta.vue | 2 +- .../dashboard/components-next/message/chips/Audio.vue | 9 ++++++++- .../composables/chatlist/useChatListKeyboardEvents.js | 3 ++- .../dashboard/store/modules/conversations/actions.js | 2 +- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/app/javascript/dashboard/components-next/Conversation/ConversationCard/CardMessagePreview.vue b/app/javascript/dashboard/components-next/Conversation/ConversationCard/CardMessagePreview.vue index a81c80b87..a2b3ad7fb 100644 --- a/app/javascript/dashboard/components-next/Conversation/ConversationCard/CardMessagePreview.vue +++ b/app/javascript/dashboard/components-next/Conversation/ConversationCard/CardMessagePreview.vue @@ -21,7 +21,7 @@ const lastNonActivityMessageContent = computed(() => { props.conversation; const { email: { subject } = {} } = customAttributes; return getPlainText( - subject || lastNonActivityMessage.content || t('CHAT_LIST.NO_CONTENT') + subject || lastNonActivityMessage?.content || t('CHAT_LIST.NO_CONTENT') ); }); diff --git a/app/javascript/dashboard/components-next/Conversation/ConversationCard/CardMessagePreviewWithMeta.vue b/app/javascript/dashboard/components-next/Conversation/ConversationCard/CardMessagePreviewWithMeta.vue index 63d014cf7..f1ad9d09b 100644 --- a/app/javascript/dashboard/components-next/Conversation/ConversationCard/CardMessagePreviewWithMeta.vue +++ b/app/javascript/dashboard/components-next/Conversation/ConversationCard/CardMessagePreviewWithMeta.vue @@ -29,7 +29,7 @@ const lastNonActivityMessageContent = computed(() => { props.conversation; const { email: { subject } = {} } = customAttributes; return getPlainText( - subject || lastNonActivityMessage.content || t('CHAT_LIST.NO_CONTENT') + subject || lastNonActivityMessage?.content || t('CHAT_LIST.NO_CONTENT') ); }); diff --git a/app/javascript/dashboard/components-next/message/chips/Audio.vue b/app/javascript/dashboard/components-next/message/chips/Audio.vue index 45a307141..eb5093d29 100644 --- a/app/javascript/dashboard/components-next/message/chips/Audio.vue +++ b/app/javascript/dashboard/components-next/message/chips/Audio.vue @@ -1,5 +1,5 @@