diff options
author | Ruben Pollan <meskio@sindominio.net> | 2017-07-24 19:21:40 +0200 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2017-08-24 17:15:20 -0400 |
commit | 3f620e20f0b18246a26aa8e0ec4c3719719700ce (patch) | |
tree | 27e64a1e7be68045eca497cab63397c419206b9c /src/leap/bitmask/core/dispatcher.py | |
parent | 00a9de84771b27e62515ce6d878d182c8f053de5 (diff) |
[feat] add mail.add_msg API call
- Resolves: #8973
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 1e364ec1..508a925d 100644 --- a/src/leap/bitmask/core/dispatcher.py +++ b/src/leap/bitmask/core/dispatcher.py @@ -282,6 +282,18 @@ class MailCmd(SubCommand): d = mail.do_mixnet_status(userid, address) return d + @register_method('dict') + def do_ADD_MSG(self, mail, *parts, **kw): + try: + userid = parts[2] + mailbox = parts[3] + msg = parts[4] + except IndexError: + raise DispatchError( + 'wrong number of arguments: expected 3, got none') + d = mail.do_add_msg(userid, msg, mailbox) + return d + class WebUICmd(SubCommand): |