summaryrefslogtreecommitdiff
path: root/alot/commands
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-03-05 08:05:29 +0100
committerAnton Khirnov <anton@khirnov.net>2020-03-05 09:59:02 +0100
commit46bb3a3efe8614478559a9594880367a8a419e53 (patch)
treee77a9acaee41a830778ca24546f66d2a8f53455f /alot/commands
parent618a235fa30a6a83aebd1f4bda526deb9e9b630a (diff)
db/utils: move message body extraction code into db/message
It is only called from there, so there is no reason to keep it elsewhere.
Diffstat (limited to 'alot/commands')
-rw-r--r--alot/commands/thread.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py
index c1e5b491..3c955c95 100644
--- a/alot/commands/thread.py
+++ b/alot/commands/thread.py
@@ -27,7 +27,6 @@ from .envelope import SendCommand
from ..completion.contacts import ContactsCompleter
from ..completion.path import PathCompleter
from ..db.utils import formataddr
-from ..db.utils import extract_body
from ..db.utils import clear_my_address
from ..db.utils import ensure_unique_address
from ..db.envelope import Envelope
@@ -677,7 +676,7 @@ class PipeCommand(Command):
pipestrings.append(mail.as_string())
elif self.output_format == 'decoded':
headertext = '\n'.join([key + ': ' + val for key, val in msg.headers.items()])
- bodytext = extract_body(mail)
+ bodytext = msg.get_body_text()
msgtext = '%s\n\n%s' % (headertext, bodytext)
pipestrings.append(msgtext)