diff options
author | Victor Shyba <victor.shyba@gmail.com> | 2014-10-17 17:03:14 -0300 |
---|---|---|
committer | Victor Shyba <victor.shyba@gmail.com> | 2014-10-17 17:03:14 -0300 |
commit | 209729cbc97bf989cb9cb149c74d5cb2c1adc3b8 (patch) | |
tree | d0a00e97726b9f29bebf46b6ba25423d212530f2 /service/pixelated/controllers | |
parent | 880bba5dd4cb370809c7a949719f015cae3126fa (diff) |
bulk mark as read #114
Diffstat (limited to 'service/pixelated/controllers')
-rw-r--r-- | service/pixelated/controllers/mails_controller.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/service/pixelated/controllers/mails_controller.py b/service/pixelated/controllers/mails_controller.py index b850d24d..ba8cbba1 100644 --- a/service/pixelated/controllers/mails_controller.py +++ b/service/pixelated/controllers/mails_controller.py @@ -65,6 +65,13 @@ class MailsController: self._search_engine.index_mail(mail) return "" + def mark_many_mail_read(self): + idents = json.loads(request.form['idents']) + for ident in idents: + mail = self._mail_service.mark_as_read(ident) + self._search_engine.index_mail(mail) + return "" + def delete_mail(self, mail_id): trashed_mail = self._mail_service.delete_mail(mail_id) self._search_engine.index_mail(trashed_mail) |