diff options
author | fiaxh <git@mx.ax.lt> | 2017-03-31 01:17:01 +0200 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-03-31 16:39:28 +0200 |
commit | 22adbd38dca0868f0e10754314a3859bba0a7d87 (patch) | |
tree | 44ecf9cf8af6aef78030dade95aecb1de2b99873 /libdino/src/entity/message.vala | |
parent | 7d2f995a097086be01426cc79c9c801dabaf9e3b (diff) | |
download | dino-22adbd38dca0868f0e10754314a3859bba0a7d87.tar.gz dino-22adbd38dca0868f0e10754314a3859bba0a7d87.zip |
Handle MUC private messages
Diffstat (limited to 'libdino/src/entity/message.vala')
-rw-r--r-- | libdino/src/entity/message.vala | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/libdino/src/entity/message.vala b/libdino/src/entity/message.vala index b5686159..4624aa87 100644 --- a/libdino/src/entity/message.vala +++ b/libdino/src/entity/message.vala @@ -20,8 +20,8 @@ public class Message : Object { ERROR, CHAT, GROUPCHAT, - HEADLINE, - NORMAL + GROUPCHAT_PM, + UNKNOWN } public int? id { get; set; } @@ -36,7 +36,7 @@ public class Message : Object { } public bool direction { get; set; } public string? real_jid { get; set; } - public Type type_ { get; set; } + public Type type_ { get; set; default = Type.UNKNOWN; } public string? body { get; set; } public string? stanza_id { get; set; } public DateTime? time { get; set; } @@ -48,10 +48,9 @@ public class Message : Object { private Database? db; - public Message(string? body, Type type) { + public Message(string? body) { this.id = -1; this.body = body; - this.type_ = type; } public Message.from_row(Database db, Qlite.Row row) { @@ -107,8 +106,6 @@ public class Message : Object { type_ = Type.CHAT; break; case Xmpp.Message.Stanza.TYPE_GROUPCHAT: type_ = Type.GROUPCHAT; break; - default: - type_ = Type.NORMAL; break; } } |