chore: Add feature flag for conversation continuity in API (#5399)

- Add the ability to toggle conversation continuity in API channel
This commit is contained in:
Pranav Raj S 2022-09-06 18:14:36 +05:30 committed by GitHub
parent 7a5ea89fd9
commit cf7dac5bab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -202,8 +202,12 @@ class Message < ApplicationRecord
inbox.web_widget? && inbox.channel.continuity_via_email
end
def email_notifiable_api_channel?
inbox.api? && inbox.account.feature_enabled?('email_continuity_on_api_channel')
end
def email_notifiable_channel?
email_notifiable_webwidget? || %w[Email].include?(inbox.inbox_type)
email_notifiable_webwidget? || %w[Email].include?(inbox.inbox_type) || email_notifiable_api_channel?
end
def can_notify_via_mail?

View file

@ -11,3 +11,5 @@
enabled: false
- name: disable_branding
enabled: false
- name: email_continuity_on_api_channel
enabled: false