changeset 153911c5d6e9 in /home/hg/repos/gajim-plugins

author: lovetox <[email protected]>
branches: 
details:gajim-plugins?cmd=changeset;node=153911c5d6e9
description: Deactivate gajim E2E encryption on startup

diffstat:

 omemo/__init__.py |  11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diffs (28 lines):

diff -r 30885eb6658e -r 153911c5d6e9 omemo/__init__.py
--- a/omemo/__init__.py Mon Jun 27 00:55:33 2016 +0200
+++ b/omemo/__init__.py Thu Jul 07 21:03:52 2016 +0200
@@ -90,6 +90,7 @@
             OmemoState if it does not exist yet.
         """
         if account not in self.omemo_states:
+            self.deactivate_gajim_e2e(account)
             db_path = os.path.join(DB_DIR, 'omemo_' + account + '.db')
             conn = sqlite3.connect(db_path, check_same_thread=False)
 
@@ -99,6 +100,16 @@
         return self.omemo_states[account]
 
     @log_calls('OmemoPlugin')
+    def deactivate_gajim_e2e(self, account):
+        """ Deativates E2E encryption in Gajim per Account
+        """
+        gajim.config.set_per('accounts', account,
+                             'autonegotiate_esessions', False)
+        gajim.config.set_per('accounts', account,
+                             'enable_esessions', False)
+        log.info(str(account) + " => Gajim E2E encryption disabled")
+
+    @log_calls('OmemoPlugin')
     def signed_in(self, show):
         """
             On sign in announce OMEMO support for each account.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to