From f8eea5136edbc23b16847a521ae6cc1b4df7b449 Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Wed, 2 Aug 2017 00:08:38 +0200 Subject: [feat] hardcode some providers to mock that they provide mixnets --- src/leap/bitmask/core/mail_services.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/leap/bitmask/core/mail_services.py b/src/leap/bitmask/core/mail_services.py index 584aa8b6..6a53eac1 100644 --- a/src/leap/bitmask/core/mail_services.py +++ b/src/leap/bitmask/core/mail_services.py @@ -605,9 +605,13 @@ class StandardMailService(service.MultiService, HookableService): def do_mixnet_status(self, userid, address): # XXX: for now there is no support in the provider # we'll mock it if it's enabled - status = 'disabled' - if self._mixnet_enabled: + provider = address.split('@')[1] + if not self._mixnet_enabled: + status = 'disabled' + elif provider in ['panoramix-project.eu', 'riseup.net']: status = 'ok' + else: + status = 'unsuported' return {'status': status} def get_token(self, userid): -- cgit v1.2.3