diff options
author | Philipp Hörist <philipp@hoerist.com> | 2019-02-20 22:19:30 +0300 |
---|---|---|
committer | Philipp Hörist <philipp@hoerist.com> | 2019-02-21 02:13:39 +0300 |
commit | 7228a478ce8dcb5673effed87bb55d096dd2ca23 (patch) | |
tree | 2fc3cd602d02b5e547fefd870f8d5375fd25702d /omemo/backend/liteaxolotlstore.py | |
parent | 2f0aafba11257e1e2c8be084752c282d37fb0df5 (diff) |
[omemo] Remove unused database code
Diffstat (limited to 'omemo/backend/liteaxolotlstore.py')
-rw-r--r-- | omemo/backend/liteaxolotlstore.py | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/omemo/backend/liteaxolotlstore.py b/omemo/backend/liteaxolotlstore.py index d58c9b1..4a10e33 100644 --- a/omemo/backend/liteaxolotlstore.py +++ b/omemo/backend/liteaxolotlstore.py @@ -131,11 +131,6 @@ class LiteAxolotlStore(AxolotlStore): record BLOB, timestamp INTEGER, active INTEGER DEFAULT 1, UNIQUE(recipient_id, device_id)); - CREATE TABLE IF NOT EXISTS encryption_state ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - jid TEXT UNIQUE, - encryption INTEGER - ); ''' create_db_sql = """ @@ -504,27 +499,3 @@ class LiteAxolotlStore(AxolotlStore): def isUntrustedIdentity(self, recipient_id, identity_key): return self.getTrustForIdentity( recipient_id, identity_key) not in (Trust.TRUSTED, Trust.UNDECIDED) - - def activate(self, jid): - query = '''INSERT OR REPLACE INTO encryption_state (jid, encryption) - VALUES (?, 1)''' - - self._con.execute(query, (jid,)) - self._con.commit() - - def deactivate(self, jid): - query = '''INSERT OR REPLACE INTO encryption_state (jid, encryption) - VALUES (?, 0)''' - - self._con.execute(query, (jid, )) - self._con.commit() - - def is_active(self, jid): - query = 'SELECT encryption FROM encryption_state where jid = ?' - result = self._con.execute(query, (jid,)).fetchone() - return result.encryption if result is not None else False - - def exist(self, jid): - query = 'SELECT encryption FROM encryption_state where jid = ?' - result = self._con.execute(query, (jid,)).fetchone() - return result is not None |