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)
|
def text_plain_body(mail)
|
||||||
if mail.parts.present?
|
if mail.parts.present?
|
||||||
mail.parts.detect(-> { mail.parts[0] }) { |part|
|
mail.text_part.decoded
|
||||||
part.content_type =~ /text\/plain/
|
|
||||||
}.body.decoded
|
|
||||||
else
|
else
|
||||||
mail.decoded
|
mail.decoded
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue