fix: Fetch conversation attributes after contact reset (#4319)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
@@ -58,6 +58,7 @@ export const actions = {
|
|||||||
if (identifier_hash) {
|
if (identifier_hash) {
|
||||||
dispatch('conversation/clearConversations', {}, { root: true });
|
dispatch('conversation/clearConversations', {}, { root: true });
|
||||||
dispatch('conversation/fetchOldConversations', {}, { root: true });
|
dispatch('conversation/fetchOldConversations', {}, { root: true });
|
||||||
|
dispatch('conversationAttributes/getAttributes', {}, { root: true });
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const {
|
const {
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ describe('#actions', () => {
|
|||||||
['get'],
|
['get'],
|
||||||
['conversation/clearConversations', {}, { root: true }],
|
['conversation/clearConversations', {}, { root: true }],
|
||||||
['conversation/fetchOldConversations', {}, { root: true }],
|
['conversation/fetchOldConversations', {}, { root: true }],
|
||||||
|
['conversationAttributes/getAttributes', {}, { root: true }],
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ window.addEventListener('chatwoot:ready', function() {
|
|||||||
console.log('chatwoot:ready', window.$chatwoot);
|
console.log('chatwoot:ready', window.$chatwoot);
|
||||||
if (window.location.search.includes('setUser')) {
|
if (window.location.search.includes('setUser')) {
|
||||||
window.$chatwoot.setUser('<%= user_id %>', {
|
window.$chatwoot.setUser('<%= user_id %>', {
|
||||||
identifier_hash: 'a<%= user_hash %>',
|
identifier_hash: '<%= user_hash %>',
|
||||||
email: 'jane@example.com',
|
email: 'jane@example.com',
|
||||||
name: 'Jane Doe',
|
name: 'Jane Doe',
|
||||||
phone_number: ''
|
phone_number: ''
|
||||||
@@ -49,6 +49,6 @@ window.addEventListener('chatwoot:ready', function() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
window.addEventListener('chatwoot:error', function(e) {
|
window.addEventListener('chatwoot:error', function(e) {
|
||||||
console.log('chatwoot:error', e.details)
|
console.log('chatwoot:error', e.detail)
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user