aboutsummaryrefslogtreecommitdiff
path: root/plugins/openpgp/src/database.vala
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/openpgp/src/database.vala')
-rw-r--r--plugins/openpgp/src/database.vala8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/openpgp/src/database.vala b/plugins/openpgp/src/database.vala
index 52005651..2bda06af 100644
--- a/plugins/openpgp/src/database.vala
+++ b/plugins/openpgp/src/database.vala
@@ -39,8 +39,8 @@ public class Database : Qlite.Database {
}
public void set_contact_key(Jid jid, string key) {
- contact_key_table.insert().or("REPLACE")
- .value(contact_key_table.jid, jid.to_string())
+ contact_key_table.upsert()
+ .value(contact_key_table.jid, jid.to_string(), true)
.value(contact_key_table.key, key)
.perform();
}
@@ -51,8 +51,8 @@ public class Database : Qlite.Database {
}
public void set_account_key(Account account, string key) {
- account_setting_table.insert().or("REPLACE")
- .value(account_setting_table.account_id, account.id)
+ account_setting_table.upsert()
+ .value(account_setting_table.account_id, account.id, true)
.value(account_setting_table.key, key)
.perform();
}