aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service
diff options
context:
space:
mode:
Diffstat (limited to 'libdino/src/service')
-rw-r--r--libdino/src/service/chat_interaction.vala4
-rw-r--r--libdino/src/service/database.vala7
2 files changed, 7 insertions, 4 deletions
diff --git a/libdino/src/service/chat_interaction.vala b/libdino/src/service/chat_interaction.vala
index 891abf29..f13623ea 100644
--- a/libdino/src/service/chat_interaction.vala
+++ b/libdino/src/service/chat_interaction.vala
@@ -135,7 +135,7 @@ public class ChatInteraction : StreamInteractionModule, Object {
private void send_chat_marker(Conversation conversation, Entities.Message message, string marker) {
Core.XmppStream stream = stream_interactor.get_stream(conversation.account);
- if (stream != null && Settings.instance().send_read &&
+ if (stream != null && Settings.instance().send_marker &&
Xep.ChatMarkers.Module.requests_marking(message.stanza)) {
stream.get_module(Xep.ChatMarkers.Module.IDENTITY).send_marker(stream, message.stanza.from, message.stanza_id, message.get_type_string(), marker);
}
@@ -143,7 +143,7 @@ public class ChatInteraction : StreamInteractionModule, Object {
private void send_chat_state_notification(Conversation conversation, string state) {
Core.XmppStream stream = stream_interactor.get_stream(conversation.account);
- if (stream != null && Settings.instance().send_read &&
+ if (stream != null && Settings.instance().send_typing &&
conversation.type_ != Conversation.Type.GROUPCHAT) {
stream.get_module(Xep.ChatStateNotifications.Module.IDENTITY).send_state(stream, conversation.counterpart.to_string(), state);
}
diff --git a/libdino/src/service/database.vala b/libdino/src/service/database.vala
index 19ca0b06..ae8d5412 100644
--- a/libdino/src/service/database.vala
+++ b/libdino/src/service/database.vala
@@ -6,7 +6,7 @@ using Dino.Entities;
namespace Dino {
public class Database : Qlite.Database {
- private const int VERSION = 2;
+ private const int VERSION = 3;
public class AccountTable : Table {
public Column<int> id = new Column.Integer("id") { primary_key = true, auto_increment = true };
@@ -86,10 +86,13 @@ public class Database : Qlite.Database {
public Column<int> type_ = new Column.Integer("type");
public Column<int> encryption = new Column.Integer("encryption");
public Column<int> read_up_to = new Column.Integer("read_up_to");
+ public Column<int> notification = new Column.Integer("notification") { min_version=3 };
+ public Column<int> send_typing = new Column.Integer("send_typing") { min_version=3 };
+ public Column<int> send_marker = new Column.Integer("send_marker") { min_version=3 };
internal ConversationTable(Database db) {
base(db, "conversation");
- init({id, account_id, jid_id, resource, active, last_active, type_, encryption, read_up_to});
+ init({id, account_id, jid_id, resource, active, last_active, type_, encryption, read_up_to, notification, send_typing, send_marker});
}
}