diff --git a/app/javascript/widget/store/modules/contacts.js b/app/javascript/widget/store/modules/contacts.js index ef146ce72..c8187a9f8 100644 --- a/app/javascript/widget/store/modules/contacts.js +++ b/app/javascript/widget/store/modules/contacts.js @@ -58,6 +58,7 @@ export const actions = { if (identifier_hash) { dispatch('conversation/clearConversations', {}, { root: true }); dispatch('conversation/fetchOldConversations', {}, { root: true }); + dispatch('conversationAttributes/getAttributes', {}, { root: true }); } } catch (error) { const { diff --git a/app/javascript/widget/store/modules/specs/contact/actions.spec.js b/app/javascript/widget/store/modules/specs/contact/actions.spec.js index f116e03f7..aeeebf7bd 100644 --- a/app/javascript/widget/store/modules/specs/contact/actions.spec.js +++ b/app/javascript/widget/store/modules/specs/contact/actions.spec.js @@ -21,6 +21,7 @@ describe('#actions', () => { ['get'], ['conversation/clearConversations', {}, { root: true }], ['conversation/fetchOldConversations', {}, { root: true }], + ['conversationAttributes/getAttributes', {}, { root: true }], ]); }); }); diff --git a/app/views/widget_tests/index.html.erb b/app/views/widget_tests/index.html.erb index 8769c0afc..8e20c06a9 100644 --- a/app/views/widget_tests/index.html.erb +++ b/app/views/widget_tests/index.html.erb @@ -40,7 +40,7 @@ window.addEventListener('chatwoot:ready', function() { console.log('chatwoot:ready', window.$chatwoot); if (window.location.search.includes('setUser')) { window.$chatwoot.setUser('<%= user_id %>', { - identifier_hash: 'a<%= user_hash %>', + identifier_hash: '<%= user_hash %>', email: 'jane@example.com', name: 'Jane Doe', phone_number: '' @@ -49,6 +49,6 @@ window.addEventListener('chatwoot:ready', function() { }) window.addEventListener('chatwoot:error', function(e) { - console.log('chatwoot:error', e.details) + console.log('chatwoot:error', e.detail) })