Bug: Fix inbox.agent_bot nil case (#841)
This commit is contained in:
parent
dedbe08a1c
commit
76b98cbed4
1 changed files with 3 additions and 1 deletions
|
@ -8,7 +8,9 @@
|
||||||
window.chatwootWebChannel = {
|
window.chatwootWebChannel = {
|
||||||
avatarUrl: '<%= @web_widget.inbox.avatar_url %>',
|
avatarUrl: '<%= @web_widget.inbox.avatar_url %>',
|
||||||
hasAConnectedAgentBot: '<%= @web_widget.inbox.agent_bot&.name %>',
|
hasAConnectedAgentBot: '<%= @web_widget.inbox.agent_bot&.name %>',
|
||||||
hideInputForBotConversations: <%= ActiveModel::Type::Boolean.new.cast(@web_widget.inbox.agent_bot&.hide_input_for_bot_conversations) %>,
|
<% if @web_widget.inbox.agent_bot %>
|
||||||
|
hideInputForBotConversations: <%= @web_widget.inbox.agent_bot.hide_input_for_bot_conversations %>,
|
||||||
|
<% end %>
|
||||||
locale: '<%= @web_widget.account.locale %>',
|
locale: '<%= @web_widget.account.locale %>',
|
||||||
websiteName: '<%= @web_widget.inbox.name %>',
|
websiteName: '<%= @web_widget.inbox.name %>',
|
||||||
websiteToken: '<%= @web_widget.website_token %>',
|
websiteToken: '<%= @web_widget.website_token %>',
|
||||||
|
|
Loading…
Reference in a new issue