feat: Add pre_chat_form_settings in inbox settings page (#1776)

This commit is contained in:
Pranav Raj S
2021-02-16 00:58:57 +05:30
committed by GitHub
parent 3ade7d4445
commit 1706199a0e
9 changed files with 188 additions and 12 deletions

View File

@@ -35,10 +35,12 @@ window.chatwootSettings = {
window.addEventListener('chatwoot:ready', function() {
console.log(window.$chatwoot);
window.$chatwoot.setUser('<%= user_id %>', {
identifier_hash: '<%= user_hash %>',
email: 'jane@example.com',
name: 'Jane Doe'
});
if (window.location.search.includes('setUser')) {
window.$chatwoot.setUser('<%= user_id %>', {
identifier_hash: '<%= user_hash %>',
email: 'jane@example.com',
name: 'Jane Doe'
});
}
})
</script>