From 3f620e20f0b18246a26aa8e0ec4c3719719700ce Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Mon, 24 Jul 2017 19:21:40 +0200 Subject: [feat] add mail.add_msg API call - Resolves: #8973 --- src/leap/bitmask/core/dispatcher.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/leap/bitmask/core/dispatcher.py') 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): -- cgit v1.2.3