feat: Add pre_chat_form_settings in inbox settings page (#1776)
This commit is contained in:
@@ -18,4 +18,8 @@ json.phone_number resource.channel.try(:phone_number)
|
||||
json.selected_feature_flags resource.channel.try(:selected_feature_flags)
|
||||
json.reply_time resource.channel.try(:reply_time)
|
||||
json.reauthorization_required resource.channel.try(:reauthorization_required?) if resource.facebook?
|
||||
json.hmac_token resource.channel.try(:hmac_token) if resource.web_widget?
|
||||
if resource.web_widget?
|
||||
json.hmac_token resource.channel.try(:hmac_token)
|
||||
json.pre_chat_form_enabled resource.channel.try(:pre_chat_form_enabled)
|
||||
json.pre_chat_form_options resource.channel.try(:pre_chat_form_options)
|
||||
end
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user