diff options
author | Thomas Weißschuh <thomas_weissschuh@lavabit.com> | 2012-06-08 16:20:36 +0000 |
---|---|---|
committer | Thomas Weißschuh <thomas_weissschuh@lavabit.com> | 2012-06-08 16:20:36 +0000 |
commit | baa6e64547085cdab48b974e0eb18941fdbb77d0 (patch) | |
tree | cc5850969fd8fbd42c4384e4d41cbe94a2d0fdcb /alot/commands/thread.py | |
parent | 029fec32c2514bceabc12bbe7b5e6e62858e02b5 (diff) |
use hook text_quote for quoting a messag body
Diffstat (limited to 'alot/commands/thread.py')
-rw-r--r-- | alot/commands/thread.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py index 767b5eb9..b649fc19 100644 --- a/alot/commands/thread.py +++ b/alot/commands/thread.py @@ -109,8 +109,12 @@ class ReplyCommand(Command): else: quotestring = 'Quoting %s (%s)\n' % (name, timestamp) mailcontent = quotestring - for line in self.message.accumulate_body().splitlines(): - mailcontent += '> ' + line + '\n' + quotehook = settings.get_hook('text_quote') + if quotehook: + mailcontent += quotehook(self.message.accumulate_body()) + else: + for line in self.message.accumulate_body().splitlines(): + mailcontent += '> ' + line + '\n' envelope = Envelope(bodytext=mailcontent) @@ -214,8 +218,12 @@ class ForwardCommand(Command): else: quote = 'Forwarded message from %s (%s):\n' % (name, timestamp) mailcontent = quote - for line in self.message.accumulate_body().splitlines(): - mailcontent += '>' + line + '\n' + quotehook = settings.get_hook('text_quote') + if quotehook: + mailcontent += quotehook(self.message.accumulate_body()) + else: + for line in self.message.accumulate_body().splitlines(): + mailcontent += '> ' + line + '\n' envelope.body = mailcontent |