aboutsummaryrefslogtreecommitdiff
path: root/plugins/omemo/src
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2021-04-07 20:16:21 +0200
committerfiaxh <git@lightrise.org>2021-04-07 21:31:47 +0200
commit4ce2bd8cd2cb100c45589bab4bc9c10c1db659cb (patch)
tree5a79863f72b078e01f3c226a8235ecaa9e15f2ab /plugins/omemo/src
parent45c0ac410433089cf973854c146b6b22df4a1a1c (diff)
downloaddino-4ce2bd8cd2cb100c45589bab4bc9c10c1db659cb.tar.gz
dino-4ce2bd8cd2cb100c45589bab4bc9c10c1db659cb.zip
Set omemo+openpgp database properties to be the same as main db
Diffstat (limited to 'plugins/omemo/src')
-rw-r--r--plugins/omemo/src/logic/database.vala12
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/omemo/src/logic/database.vala b/plugins/omemo/src/logic/database.vala
index 429b5f0b..ec5a0924 100644
--- a/plugins/omemo/src/logic/database.vala
+++ b/plugins/omemo/src/logic/database.vala
@@ -256,12 +256,14 @@ public class Database : Qlite.Database {
session = new SessionTable(this);
content_item_meta = new ContentItemMetaTable(this);
init({identity_meta, trust, identity, signed_pre_key, pre_key, session, content_item_meta});
+
try {
- exec("PRAGMA synchronous=0");
- } catch (Error e) { }
- try {
- exec("PRAGMA secure_delete=1");
- } catch (Error e) { }
+ exec("PRAGMA journal_mode = WAL");
+ exec("PRAGMA synchronous = NORMAL");
+ exec("PRAGMA secure_delete = ON");
+ } catch (Error e) {
+ error("Failed to set OMEMO database properties: %s", e.message);
+ }
}
public override void migrate(long oldVersion) {