From bec810e234a7b9783eb8f35e2ffd7c60d75e09c7 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Fri, 26 Jan 2018 20:35:29 +0100 Subject: Visually highlight mentions in MUCs fixes #267 --- libdino/src/entity/conversation.vala | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libdino/src/entity') diff --git a/libdino/src/entity/conversation.vala b/libdino/src/entity/conversation.vala index a3a28618..9026e33f 100644 --- a/libdino/src/entity/conversation.vala +++ b/libdino/src/entity/conversation.vala @@ -16,7 +16,7 @@ public class Conversation : Object { public Type type_ { get; set; } public Account account { get; private set; } public Jid counterpart { get; private set; } - public string? nickname { get; private set; } + public string? nickname { get; set; } public bool active { get; set; default = false; } private DateTime? _last_active; public DateTime? last_active { @@ -84,6 +84,9 @@ public class Conversation : Object { if (read_up_to != null) { insert.value(db.conversation.read_up_to, read_up_to.id); } + if (nickname != null) { + insert.value(db.conversation.resource, nickname); + } if (counterpart.is_full()) { insert.value(db.conversation.resource, counterpart.resourcepart); } @@ -145,6 +148,8 @@ public class Conversation : Object { update.set_null(db.conversation.read_up_to); } break; + case "nickname": + update.set(db.conversation.resource, nickname); break; case "active": update.set(db.conversation.active, active); break; case "last-active": -- cgit v1.2.3-70-g09d2