summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/core/dispatcher.py
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2017-07-18 15:43:35 +0200
committerKali Kaneko <kali@leap.se>2017-08-24 17:13:39 -0400
commit8cebf955ad71975a20275a780a67b31099759e3a (patch)
tree998562d9398e0aee9b7adb7cfbb28170b816c00a /src/leap/bitmask/core/dispatcher.py
parent3b4508dff9dc1a681f3c96edcef4e43aa3da29a8 (diff)
[feat] add a mock mixnet_status call to the API
For now we say it will be mixed on every request if the mixnet is enabled. We might want a better mock in the future. - Resolves: #8972
Diffstat (limited to 'src/leap/bitmask/core/dispatcher.py')
-rw-r--r--src/leap/bitmask/core/dispatcher.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/leap/bitmask/core/dispatcher.py b/src/leap/bitmask/core/dispatcher.py
index 7a2d48a2..519ec9df 100644
--- a/src/leap/bitmask/core/dispatcher.py
+++ b/src/leap/bitmask/core/dispatcher.py
@@ -267,6 +267,17 @@ class MailCmd(SubCommand):
d = mail.get_token()
return d
+ @register_method('dict')
+ def do_MIXNET_STATUS(self, mail, *parts, **kw):
+ try:
+ userid = parts[2]
+ address = parts[3]
+ except IndexError:
+ raise DispatchError(
+ 'wrong number of arguments: expected 2')
+ d = mail.do_mixnet_status(userid, address)
+ return d
+
class WebUICmd(SubCommand):