aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/entities
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-12-04 16:20:28 +0100
committeriNPUTmice <daniel@gultsch.de>2014-12-10 14:08:06 +0100
commit34558cc2779e5fd3cb8a2afa39be0efcc5314d88 (patch)
tree59e8e5c8b6f3a0fad1b8d779707279f45b399641 /src/main/java/eu/siacs/conversations/entities
parent2b958e51df8655d63b713efa10870c40bdc42856 (diff)
store last message received date in conversation
Diffstat (limited to 'src/main/java/eu/siacs/conversations/entities')
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Conversation.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Conversation.java b/src/main/java/eu/siacs/conversations/entities/Conversation.java
index a7da0bc29..725ed27b6 100644
--- a/src/main/java/eu/siacs/conversations/entities/Conversation.java
+++ b/src/main/java/eu/siacs/conversations/entities/Conversation.java
@@ -43,6 +43,7 @@ public class Conversation extends AbstractEntity {
public static final String ATTRIBUTE_NEXT_ENCRYPTION = "next_encryption";
public static final String ATTRIBUTE_MUC_PASSWORD = "muc_password";
public static final String ATTRIBUTE_MUTED_TILL = "muted_till";
+ public static final String ATTRIBUTE_LAST_MESSAGE_RECEIVED = "last_message_received";
private String name;
private String contactUuid;
@@ -470,6 +471,14 @@ public class Conversation extends AbstractEntity {
}
}
+ public void setLastMessageReceived(long value) {
+ this.setAttribute(ATTRIBUTE_LAST_MESSAGE_RECEIVED, String.valueOf(value));
+ }
+
+ public long getLastMessageReceived() {
+ return getLongAttribute(ATTRIBUTE_LAST_MESSAGE_RECEIVED,0);
+ }
+
public void setMutedTill(long value) {
this.setAttribute(ATTRIBUTE_MUTED_TILL, String.valueOf(value));
}