feat: Add APIs for Dialogflow integration V1 (#2155)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com> Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
@@ -142,7 +142,7 @@ class Conversation < ApplicationRecord
|
||||
end
|
||||
|
||||
def set_bot_conversation
|
||||
self.status = :bot if inbox.agent_bot_inbox&.active?
|
||||
self.status = :bot if inbox.agent_bot_inbox&.active? || inbox.hooks.pluck(:app_id).include?('dialogflow')
|
||||
end
|
||||
|
||||
def notify_conversation_creation
|
||||
|
||||
@@ -38,6 +38,8 @@ class Integrations::App
|
||||
case params[:id]
|
||||
when 'slack'
|
||||
ENV['SLACK_CLIENT_SECRET'].present?
|
||||
when 'dialogflow'
|
||||
false
|
||||
else
|
||||
true
|
||||
end
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
# id :bigint not null, primary key
|
||||
# access_token :string
|
||||
# hook_type :integer default("account")
|
||||
# settings :text
|
||||
# settings :jsonb
|
||||
# status :integer default("disabled")
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
|
||||
Reference in New Issue
Block a user