feat: Ability to toggle conversation continuity via email (#3817)

Fixes: #3368
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Sojan Jose
2022-01-26 15:59:48 -08:00
committed by GitHub
parent 34e8ad9dc5
commit 59deffc7e3
9 changed files with 113 additions and 50 deletions

View File

@@ -34,36 +34,43 @@ 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)
json.continuity_via_email resource.channel.try(:continuity_via_email)
end
## Facebook Attributes
json.page_id resource.channel.try(:page_id)
json.reauthorization_required resource.channel.try(:reauthorization_required?) if resource.facebook?
if resource.facebook?
json.page_id resource.channel.try(:page_id)
json.reauthorization_required resource.channel.try(:reauthorization_required?)
end
## Twilio Attributes
json.phone_number resource.channel.try(:phone_number)
json.medium resource.channel.try(:medium) if resource.twilio?
## Email Channel Attributes
json.forward_to_email resource.channel.try(:forward_to_email)
json.email resource.channel.try(:email) if resource.email?
if resource.email?
## Email Channel Attributes
json.forward_to_email resource.channel.try(:forward_to_email)
json.email resource.channel.try(:email)
## IMAP
json.imap_email resource.channel.try(:imap_email) if resource.email?
json.imap_password resource.channel.try(:imap_password) if resource.email?
json.imap_address resource.channel.try(:imap_address) if resource.email?
json.imap_port resource.channel.try(:imap_port) if resource.email?
json.imap_enabled resource.channel.try(:imap_enabled) if resource.email?
json.imap_enable_ssl resource.channel.try(:imap_enable_ssl) if resource.email?
## IMAP
json.imap_email resource.channel.try(:imap_email)
json.imap_password resource.channel.try(:imap_password)
json.imap_address resource.channel.try(:imap_address)
json.imap_port resource.channel.try(:imap_port)
json.imap_enabled resource.channel.try(:imap_enabled)
json.imap_enable_ssl resource.channel.try(:imap_enable_ssl)
## SMTP
json.smtp_email resource.channel.try(:smtp_email) if resource.email?
json.smtp_password resource.channel.try(:smtp_password) if resource.email?
json.smtp_address resource.channel.try(:smtp_address) if resource.email?
json.smtp_port resource.channel.try(:smtp_port) if resource.email?
json.smtp_enabled resource.channel.try(:smtp_enabled) if resource.email?
json.smtp_domain resource.channel.try(:smtp_domain) if resource.email?
## SMTP
json.smtp_email resource.channel.try(:smtp_email)
json.smtp_password resource.channel.try(:smtp_password)
json.smtp_address resource.channel.try(:smtp_address)
json.smtp_port resource.channel.try(:smtp_port)
json.smtp_enabled resource.channel.try(:smtp_enabled)
json.smtp_domain resource.channel.try(:smtp_domain)
end
## API Channel Attributes
json.webhook_url resource.channel.try(:webhook_url) if resource.api?
json.inbox_identifier resource.channel.try(:identifier) if resource.api?
if resource.api?
json.webhook_url resource.channel.try(:webhook_url)
json.inbox_identifier resource.channel.try(:identifier)
end