diff options
author | drebs <drebs@riseup.net> | 2017-02-23 19:31:30 -0300 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2017-02-27 20:55:01 +0100 |
commit | 06e8b6f6b0b758866c053762be4716d7050c1943 (patch) | |
tree | c9b808d36404ffff496fb5dfde1eefcf850ba91f /src/leap/bitmask/core | |
parent | efced3ee9e227f30078503ed2584dbbe6f4615e1 (diff) |
[refactor] use new soledad client parameter
- Resolves: #8721
Diffstat (limited to 'src/leap/bitmask/core')
-rw-r--r-- | src/leap/bitmask/core/mail_services.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/leap/bitmask/core/mail_services.py b/src/leap/bitmask/core/mail_services.py index 98f88ade..17e5d099 100644 --- a/src/leap/bitmask/core/mail_services.py +++ b/src/leap/bitmask/core/mail_services.py @@ -112,12 +112,6 @@ class SoledadContainer(Container): secrets_path = os.path.join(soledad_path, '%s.secret' % uuid) local_db_path = os.path.join(soledad_path, '%s.db' % uuid) - if token is None: - syncable = False - token = '' - else: - syncable = True - return Soledad( uuid, unicode(passphrase), @@ -126,14 +120,14 @@ class SoledadContainer(Container): server_url=server_url, cert_file=cert_file, auth_token=token, - syncable=syncable) + offline=True) def set_remote_auth_token(self, userid, token): self.get_instance(userid).token = token - def set_syncable(self, userid, state): + def set_offline(self, userid, state): # TODO should check that there's a token! - self.get_instance(userid).set_syncable(bool(state)) + self.get_instance(userid).set_offline(bool(state)) def sync(self, userid): self.get_instance(userid).sync() @@ -206,7 +200,7 @@ class SoledadService(HookableService): if container.get_instance(userid): logger.debug("passing a new SRP Token to Soledad: %s" % userid) container.set_remote_auth_token(userid, token) - container.set_syncable(userid, True) + container.set_offline(userid, False) else: logger.debug("adding a new Soledad Instance: %s" % userid) container.add_instance( |