summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2012-09-22 20:02:16 +0100
committerPatrick Totzke <patricktotzke@gmail.com>2012-09-22 20:02:16 +0100
commitfbaba32d29353dbf31a0e13f2ffee428ed234070 (patch)
tree0c08cf8562bcdb4ff952db3b34e22a3a4473f92c
parenteee364c0b3ba46579959fad6091d5d65b27ddf26 (diff)
fix issue with initial tags
-rw-r--r--alot/commands/envelope.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/alot/commands/envelope.py b/alot/commands/envelope.py
index d5a23980..614061f6 100644
--- a/alot/commands/envelope.py
+++ b/alot/commands/envelope.py
@@ -186,9 +186,11 @@ class SendCommand(Command):
# define callback
def afterwards(returnvalue):
+ initial_tags = []
if self.envelope is not None:
self.envelope.sending = False
self.envelope.sent_time = datetime.datetime.now()
+ initial_tags = self.envelope.tags
logging.debug('mail sent successfully')
ui.clear_notify([clearme])
if self.envelope_buffer is not None:
@@ -203,7 +205,7 @@ class SendCommand(Command):
# add mail to index if maildir path available
if path is not None:
logging.debug('adding new mail to index')
- ui.dbman.add_message(path, account.sent_tags + envelope.tags)
+ ui.dbman.add_message(path, account.sent_tags + initial_tags)
ui.apply_command(globals.FlushCommand())
# define errback