feat: Generate SSO URL in Chatwoot, move Captain to primary tab (#9871)

- Generate SSO URL in Chatwoot, move Captain to the primary tab

Co-authored-by: Pranav <pranavrajs@gmail.com>
This commit is contained in:
Sojan Jose
2024-08-01 19:22:34 -07:00
committed by GitHub
parent 17a6df10a0
commit 829bb842fd
16 changed files with 237 additions and 12 deletions

View File

@@ -31,7 +31,8 @@ class Integrations::Captain::ProcessorService < Integrations::BotProcessorServic
end
def call_captain(message_content)
url = "#{ENV.fetch('CAPTAIN_API_URL', nil)}/accounts/#{hook.settings['account_id']}/assistants/#{hook.settings['assistant_id']}/chat"
url = "#{GlobalConfigService.load('CAPTAIN_API_URL',
'')}/accounts/#{hook.settings['account_id']}/assistants/#{hook.settings['assistant_id']}/chat"
headers = {
'X-USER-EMAIL' => hook.settings['account_email'],