diff options
author | fiaxh <git@mx.ax.lt> | 2017-03-09 15:34:32 +0100 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-03-09 15:45:03 +0100 |
commit | 5fc0435cc1227bf445d06a3931343020faaecd10 (patch) | |
tree | 329041d3b2545fc445e9f175d3d5fff755fd110b /client/src/entity/conversation.vala | |
parent | b1e6e51c4f79f57f0a01b183ef185408fb22cc36 (diff) | |
download | dino-5fc0435cc1227bf445d06a3931343020faaecd10.tar.gz dino-5fc0435cc1227bf445d06a3931343020faaecd10.zip |
Save unsent messages (acc offline etc) and send later; don't send pgp messages if pgp error
Diffstat (limited to 'client/src/entity/conversation.vala')
-rw-r--r-- | client/src/entity/conversation.vala | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/client/src/entity/conversation.vala b/client/src/entity/conversation.vala index d5c861d9..2da6dce3 100644 --- a/client/src/entity/conversation.vala +++ b/client/src/entity/conversation.vala @@ -3,19 +3,23 @@ public class Conversation : Object { public signal void object_updated(Conversation conversation); - public const int ENCRYPTION_UNENCRYPTED = 0; - public const int ENCRYPTION_PGP = 1; + public enum Encryption { + UNENCRYPTED, + PGP + } - public const int TYPE_CHAT = 0; - public const int TYPE_GROUPCHAT = 1; + public enum Type { + CHAT, + GROUPCHAT + } public int id { get; set; } public Account account { get; private set; } public Jid counterpart { get; private set; } public bool active { get; set; } public DateTime last_active { get; set; } - public int encryption { get; set; } - public int? type_ { get; set; } + public Encryption encryption { get; set; } + public Type? type_ { get; set; } public Message read_up_to { get; set; } public Conversation(Jid jid, Account account) { @@ -23,7 +27,7 @@ public class Conversation : Object { this.account = account; this.active = false; this.last_active = new DateTime.from_unix_utc(0); - this.encryption = ENCRYPTION_UNENCRYPTED; + this.encryption = Encryption.UNENCRYPTED; } public Conversation.with_id(Jid jid, Account account, int id) { |