aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/entity/conversation.vala
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2018-01-12 21:13:46 +0100
committerfiaxh <git@mx.ax.lt>2018-01-28 00:38:47 +0100
commitbbfac9115500405095210f046dbccef913d03e04 (patch)
treed8cce86ecf58e4cf9a0a3e5bc7192df0c12f1e94 /libdino/src/entity/conversation.vala
parent782ae4c049e2b6fab13d7453cbb0e74610e7d200 (diff)
downloaddino-bbfac9115500405095210f046dbccef913d03e04.tar.gz
dino-bbfac9115500405095210f046dbccef913d03e04.zip
Fix certain Slack specific issues (using host-based workarounds)
Diffstat (limited to 'libdino/src/entity/conversation.vala')
-rw-r--r--libdino/src/entity/conversation.vala2
1 files changed, 2 insertions, 0 deletions
diff --git a/libdino/src/entity/conversation.vala b/libdino/src/entity/conversation.vala
index fe9cf9ad..a3a28618 100644
--- a/libdino/src/entity/conversation.vala
+++ b/libdino/src/entity/conversation.vala
@@ -16,6 +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 bool active { get; set; default = false; }
private DateTime? _last_active;
public DateTime? last_active {
@@ -55,6 +56,7 @@ public class Conversation : Object {
string? resource = row[db.conversation.resource];
counterpart = Jid.parse(db.get_jid_by_id(row[db.conversation.jid_id]));
if (type_ == Conversation.Type.GROUPCHAT_PM) counterpart = counterpart.with_resource(resource);
+ nickname = type_ == Conversation.Type.GROUPCHAT ? resource : null;
active = row[db.conversation.active];
int64? last_active = row[db.conversation.last_active];
if (last_active != null) this.last_active = new DateTime.from_unix_utc(last_active);