diff --git a/app/javascript/widget/components/ChatFooter.vue b/app/javascript/widget/components/ChatFooter.vue index 53da736b7..9de6d4275 100755 --- a/app/javascript/widget/components/ChatFooter.vue +++ b/app/javascript/widget/components/ChatFooter.vue @@ -101,6 +101,7 @@ export default { IFrameHelper.sendMessage({ event: 'onEvent', eventIdentifier: CHATWOOT_ON_START_CONVERSATION, + data: { hasConversation: true }, }); }, async sendTranscript() { diff --git a/app/javascript/widget/components/TeamAvailability.vue b/app/javascript/widget/components/TeamAvailability.vue index 58e18b3e1..984dfbe3f 100644 --- a/app/javascript/widget/components/TeamAvailability.vue +++ b/app/javascript/widget/components/TeamAvailability.vue @@ -89,6 +89,7 @@ export default { IFrameHelper.sendMessage({ event: 'onEvent', eventIdentifier: CHATWOOT_ON_START_CONVERSATION, + data: { hasConversation: false }, }); } }, diff --git a/app/views/widget_tests/index.html.erb b/app/views/widget_tests/index.html.erb index 560cbd499..42e7583fb 100644 --- a/app/views/widget_tests/index.html.erb +++ b/app/views/widget_tests/index.html.erb @@ -62,6 +62,6 @@ window.addEventListener('chatwoot:on-message', function(e) { window.addEventListener('chatwoot:on-start-conversation', function(e) { - console.log('chatwoot:on-start-conversation') + console.log('chatwoot:on-start-conversation', e.detail) })