simplification de l'accès au corps en texte brut
This commit is contained in:
parent
c35e20d314
commit
d13dd70fd1
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue