aboutsummaryrefslogtreecommitdiff
path: root/libdino
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2024-12-28 20:29:52 +0100
committerfiaxh <git@lightrise.org>2025-01-12 19:35:58 +0100
commit6322ed819e47d9c3371f214e4209d01cac1abfcf (patch)
treea7cfeed708a59f5eb99b4dbed70b0efb9212446f /libdino
parent5ee322cbd987d36497522b82b876659e1d19da43 (diff)
downloaddino-6322ed819e47d9c3371f214e4209d01cac1abfcf.tar.gz
dino-6322ed819e47d9c3371f214e4209d01cac1abfcf.zip
Show banner when contact is not yet subscribed
Diffstat (limited to 'libdino')
-rw-r--r--libdino/src/service/database.vala5
-rw-r--r--libdino/src/service/roster_manager.vala1
2 files changed, 4 insertions, 2 deletions
diff --git a/libdino/src/service/database.vala b/libdino/src/service/database.vala
index bfa76890..06676951 100644
--- a/libdino/src/service/database.vala
+++ b/libdino/src/service/database.vala
@@ -7,7 +7,7 @@ using Dino.Entities;
namespace Dino {
public class Database : Qlite.Database {
- private const int VERSION = 28;
+ private const int VERSION = 29;
public class AccountTable : Table {
public Column<int> id = new Column.Integer("id") { primary_key = true, auto_increment = true };
@@ -345,10 +345,11 @@ public class Database : Qlite.Database {
public Column<string> jid = new Column.Text("jid");
public Column<string> handle = new Column.Text("name");
public Column<string> subscription = new Column.Text("subscription");
+ public Column<string> ask = new Column.Text("ask") { min_version=29 };
internal RosterTable(Database db) {
base(db, "roster");
- init({account_id, jid, handle, subscription});
+ init({account_id, jid, handle, subscription, ask});
unique({account_id, jid}, "IGNORE");
}
}
diff --git a/libdino/src/service/roster_manager.vala b/libdino/src/service/roster_manager.vala
index 8d9d91fb..6ddcda68 100644
--- a/libdino/src/service/roster_manager.vala
+++ b/libdino/src/service/roster_manager.vala
@@ -133,6 +133,7 @@ public class RosterStoreImpl : Roster.Storage, Object {
.value(db.roster.jid, item.jid.to_string(), true)
.value(db.roster.handle, item.name)
.value(db.roster.subscription, item.subscription)
+ .value(db.roster.ask, item.ask)
.perform();
}