diff options
author | Ruben Pollan <meskio@sindominio.net> | 2017-12-08 18:10:13 +0100 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2017-12-20 15:27:06 +0100 |
commit | d2e5f8406b6101971c196f40e39322e36d6bdb33 (patch) | |
tree | cfe3fb852f80effd52b7a75688cd2a5118fe9a1f /src/leap/bitmask/core/dispatcher.py | |
parent | d5bd7394344afd2c6466f368a0de7566094a0d0d (diff) |
[feat] Add msg_status call to the mail API
To get the status of a single message providing it's mailbox and
message-id. For now it only returns encryption/signature status.
- Resolves: #6914
Diffstat (limited to 'src/leap/bitmask/core/dispatcher.py')
-rw-r--r-- | src/leap/bitmask/core/dispatcher.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/leap/bitmask/core/dispatcher.py b/src/leap/bitmask/core/dispatcher.py index e97e6c0b..20c0615b 100644 --- a/src/leap/bitmask/core/dispatcher.py +++ b/src/leap/bitmask/core/dispatcher.py @@ -286,6 +286,18 @@ class MailCmd(SubCommand): return mail.get_token(userid) @register_method('dict') + def do_MSG_STATUS(self, mail, *parts, **kw): + try: + userid = parts[2] + mbox = parts[3] + message_id = parts[4] + except IndexError: + raise DispatchError( + 'wrong number of arguments: expected 3') + d = mail.do_msg_status(userid, mbox, message_id) + return d + + @register_method('dict') def do_MIXNET_STATUS(self, mail, *parts, **kw): try: userid = parts[2] |