fix: Update auto reply and hide reply time for email inbox (#3985)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Aswin Dev P.S
2022-02-15 03:41:28 -08:00
committed by GitHub
parent e6f8895c1b
commit 464e12ceb7
4 changed files with 38 additions and 10 deletions

View File

@@ -136,6 +136,13 @@ class Message < ApplicationRecord
I18n.t('conversations.survey.response', link: "#{ENV['FRONTEND_URL']}/survey/responses/#{conversation.uuid}")
end
def email_notifiable_message?
return false if private? || incoming?
return false if template? && %w[input_csat text].exclude?(content_type)
true
end
private
def ensure_content_type
@@ -194,13 +201,6 @@ class Message < ApplicationRecord
email_notifiable_webwidget? || %w[Email].include?(inbox.inbox_type)
end
def email_notifiable_message?
return false unless outgoing? || input_csat?
return false if private?
true
end
def can_notify_via_mail?
return unless email_notifiable_message?
return unless email_notifiable_channel?