From 34558cc2779e5fd3cb8a2afa39be0efcc5314d88 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Thu, 4 Dec 2014 16:20:28 +0100 Subject: store last message received date in conversation --- src/main/java/eu/siacs/conversations/entities/Conversation.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/main/java/eu/siacs/conversations/entities') 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)); } -- cgit v1.2.3