aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/entity/message.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2020-06-10 23:40:00 +0200
committerfiaxh <git@lightrise.org>2020-06-10 23:40:00 +0200
commit0beb592c5a6a2767e11a892bdb5ac9bcc5283c38 (patch)
treebea2894d322472292590ec126dc1b52543a10a7e /libdino/src/entity/message.vala
parent50c55c7f55aff6622d242bdcf2b58d5f7956f28e (diff)
downloaddino-0beb592c5a6a2767e11a892bdb5ac9bcc5283c38.tar.gz
dino-0beb592c5a6a2767e11a892bdb5ac9bcc5283c38.zip
Use sqlite UPSERT
Diffstat (limited to 'libdino/src/entity/message.vala')
-rw-r--r--libdino/src/entity/message.vala4
1 files changed, 2 insertions, 2 deletions
diff --git a/libdino/src/entity/message.vala b/libdino/src/entity/message.vala
index bce3bec4..89ad241a 100644
--- a/libdino/src/entity/message.vala
+++ b/libdino/src/entity/message.vala
@@ -196,8 +196,8 @@ public class Message : Object {
update_builder.perform();
if (sp.get_name() == "real-jid") {
- db.real_jid.insert().or("REPLACE")
- .value(db.real_jid.message_id, id)
+ db.real_jid.upsert()
+ .value(db.real_jid.message_id, id, true)
.value(db.real_jid.real_jid, real_jid.to_string())
.perform();
}