aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/entity
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2018-01-26 20:35:29 +0100
committerfiaxh <git@mx.ax.lt>2018-01-28 20:32:54 +0100
commitbec810e234a7b9783eb8f35e2ffd7c60d75e09c7 (patch)
tree48ad4e1425920e9865a7db13b881cb7cd3308e86 /libdino/src/entity
parent57c72d2818dec6c713834cfbb8c4c566a1602907 (diff)
downloaddino-bec810e234a7b9783eb8f35e2ffd7c60d75e09c7.tar.gz
dino-bec810e234a7b9783eb8f35e2ffd7c60d75e09c7.zip
Visually highlight mentions in MUCs
fixes #267
Diffstat (limited to 'libdino/src/entity')
-rw-r--r--libdino/src/entity/conversation.vala7
1 files changed, 6 insertions, 1 deletions
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":