Mercurial > libervia-backend
diff sat/core/sat_main.py @ 3226:2f406b762788
core (memory/encryption): encryption session are now restored on client connection
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 22 Mar 2020 18:39:12 +0100 |
parents | 4fbea7f1e012 |
children | b0c57c9a4bd8 |
line wrap: on
line diff
--- a/sat/core/sat_main.py Sun Mar 22 18:35:22 2020 +0100 +++ b/sat/core/sat_main.py Sun Mar 22 18:39:12 2020 +0100 @@ -849,12 +849,14 @@ profile_key=C.PROF_KEY_NONE): client = self.getClient(profile_key) to_jid = jid.JID(to_jid_s) - return client.encryption.start(to_jid, namespace or None, replace) + return defer.ensureDeferred( + client.encryption.start(to_jid, namespace or None, replace)) def _messageEncryptionStop(self, to_jid_s, profile_key=C.PROF_KEY_NONE): client = self.getClient(profile_key) to_jid = jid.JID(to_jid_s) - return client.encryption.stop(to_jid) + return defer.ensureDeferred( + client.encryption.stop(to_jid)) def _messageEncryptionGet(self, to_jid_s, profile_key=C.PROF_KEY_NONE): client = self.getClient(profile_key)