Chore: Parse quoted text in incoming emails (#883) (#884)

* Chore: Parse quoted text in incoming emails (#883)
* Parsed the quoted text and replies in incoming emails and store them separately
* Did this parsing for plain text and html part of emails
* In the chat window, we will only show the parsed reply alone

* Conversation mailbox test fixes (#883)
This commit is contained in:
Sony Mathew
2020-05-22 18:07:06 +05:30
committed by GitHub
parent 00093fa408
commit 11b4b4ea3f
4 changed files with 59 additions and 13 deletions

View File

@@ -21,7 +21,7 @@ class ConversationMailbox < ApplicationMailbox
@message = @conversation.messages.create(
account_id: @conversation.account_id,
contact_id: @conversation.contact_id,
content: processed_mail.content,
content: processed_mail.text_content[:reply],
inbox_id: @conversation.inbox_id,
message_type: 'incoming',
content_type: 'incoming_email',
@@ -71,6 +71,6 @@ class ConversationMailbox < ApplicationMailbox
end
def decorate_mail
@processed_mail = MailPresenter.new(mail)
@processed_mail = MailPresenter.new(mail, @conversation.account)
end
end