fix: Update mail check for html_part (#7273)
This commit is contained in:
@@ -125,7 +125,7 @@ class Inboxes::FetchImapEmailsJob < ApplicationJob
|
||||
rescue StandardError => e
|
||||
ChatwootExceptionTracker.new(e, account: channel.account).capture_exception
|
||||
Rails.logger.error("
|
||||
#{channel.provider} Email dropped: #{inbound_mail.from} and message_source_id: #{inbound_mail.message_id}, message_id: #{message_id}")
|
||||
#{channel.provider} Email dropped: #{inbound_mail.from} and message_source_id: #{inbound_mail.message_id}")
|
||||
end
|
||||
|
||||
# Making sure the access token is valid for microsoft provider
|
||||
|
||||
@@ -38,11 +38,9 @@ module MailboxHelper
|
||||
end
|
||||
|
||||
def embed_inline_image_source(mail_attachment)
|
||||
current_mail = processed_mail.mail
|
||||
|
||||
if current_mail.html_part.present?
|
||||
if processed_mail.serialized_data[:html_content].present?
|
||||
upload_inline_image(mail_attachment)
|
||||
elsif current_mail.text_part.present?
|
||||
elsif processed_mail.serialized_data[:text_content].present?
|
||||
embed_plain_text_email_with_inline_image(mail_attachment)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user