From d13dd70fd159fb7df2827fe743f09e7dd116ca5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lecour?= Date: Mon, 28 Dec 2020 00:52:20 +0100 Subject: [PATCH] =?UTF-8?q?simplification=20de=20l'acc=C3=A8s=20au=20corps?= =?UTF-8?q?=20en=20texte=20brut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/mailboxes/in_mailbox.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/mailboxes/in_mailbox.rb b/app/mailboxes/in_mailbox.rb index 2d268cf..64c1ee5 100644 --- a/app/mailboxes/in_mailbox.rb +++ b/app/mailboxes/in_mailbox.rb @@ -32,9 +32,7 @@ class InMailbox < ApplicationMailbox def text_plain_body(mail) if mail.parts.present? - mail.parts.detect(-> { mail.parts[0] }) { |part| - part.content_type =~ /text\/plain/ - }.body.decoded + mail.text_part.decoded else mail.decoded end