summaryrefslogtreecommitdiff
path: root/alot/commands/envelope.py
diff options
context:
space:
mode:
Diffstat (limited to 'alot/commands/envelope.py')
-rw-r--r--alot/commands/envelope.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/alot/commands/envelope.py b/alot/commands/envelope.py
index 1f806581..457fe48a 100644
--- a/alot/commands/envelope.py
+++ b/alot/commands/envelope.py
@@ -140,8 +140,7 @@ class SaveCommand(Command):
ui.notify(msg + ' to %s' % path)
logging.debug('adding new mail to index')
try:
- ui.dbman.add_message(path, account.draft_tags + envelope.tags)
- await ui.apply_command(globals.FlushCommand())
+ await ui.dbman.msg_add(path, account.draft_tags | envelope.tags)
await ui.apply_command(commands.globals.BufferCloseCommand())
except DatabaseError as e:
logging.error(str(e))
@@ -295,9 +294,9 @@ class SendCommand(Command):
ui.notify('mail sent successfully')
if self.envelope is not None:
if self.envelope.replied:
- self.envelope.replied.add_tags(account.replied_tags)
+ await self.envelope.replied.tags_add(account.replied_tags)
if self.envelope.passed:
- self.envelope.passed.add_tags(account.passed_tags)
+ await self.envelope.passed.tags_add(account.passed_tags)
# store mail locally
# This can raise StoreMailError
@@ -306,8 +305,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 | initial_tags)
- await ui.apply_command(globals.FlushCommand())
+ await ui.dbman.msg_add(path, account.sent_tags | initial_tags)
@registerCommand(MODE, 'edit', arguments=[