diff options
author | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-01-27 20:40:42 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-01-27 20:40:42 +0100 |
commit | 4f902d8210d50a586c7ece1bb7da2ab26fd18da5 (patch) | |
tree | b15d34a909443f79ac10d28f23eca19cf1c3301e /src/de/gultsch/chat/entities/Message.java | |
parent | 898b0ca8c485888e06e2b5b1c798eebce1a6dabc (diff) |
conversation archiveable. new conversation will find or restart old conversations
Diffstat (limited to '')
-rw-r--r-- | src/de/gultsch/chat/entities/Message.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/de/gultsch/chat/entities/Message.java b/src/de/gultsch/chat/entities/Message.java index 26e646ff..b52e44b4 100644 --- a/src/de/gultsch/chat/entities/Message.java +++ b/src/de/gultsch/chat/entities/Message.java @@ -35,8 +35,9 @@ public class Message extends AbstractEntity { public Message(Conversation conversation, String body, int encryption) { this(java.util.UUID.randomUUID().toString(), conversation.getUuid(), - conversation.getContactJid(), body, 0, encryption, + conversation.getContactJid(), body, System.currentTimeMillis(), encryption, Message.STATUS_UNSEND); + this.conversation = conversation; } public Message(String uuid, String conversationUUid, String counterpart, @@ -66,6 +67,10 @@ public class Message extends AbstractEntity { public String getConversationUuid() { return conversationUuid; } + + public Conversation getConversation() { + return this.conversation; + } public String getCounterpart() { return counterpart; @@ -97,4 +102,8 @@ public class Message extends AbstractEntity { cursor.getInt(cursor.getColumnIndex(STATUS))); } + public void setConversation(Conversation conv) { + this.conversation = conv; + } + } |