From b13e50521bad327433553ab723fdf910c89760fe Mon Sep 17 00:00:00 2001 From: Cory Redmond Date: Wed, 30 Sep 2015 15:42:37 +0100 Subject: [PATCH] Add the ability to mark read status of conversations. --- .../maximvdw/spigotsite/api/user/Conversation.java | 11 +++++++++++ .../spigotsite/api/user/ConversationManager.java | 13 +++++++++++++ 2 files changed, 24 insertions(+) diff --git a/src/main/java/be/maximvdw/spigotsite/api/user/Conversation.java b/src/main/java/be/maximvdw/spigotsite/api/user/Conversation.java index 9349406..3aa7f07 100644 --- a/src/main/java/be/maximvdw/spigotsite/api/user/Conversation.java +++ b/src/main/java/be/maximvdw/spigotsite/api/user/Conversation.java @@ -53,6 +53,17 @@ public interface Conversation { */ public boolean isUnread(); + /** + * Set the unread status of a conversation + * + * @param user + * Authenticated user + * @param unreadOrNot + * True to set unread, false to set read + */ + public void markAsUnread(User user, + boolean unreadOrNot) throws SpamWarningException; + /** * Get the last replier * diff --git a/src/main/java/be/maximvdw/spigotsite/api/user/ConversationManager.java b/src/main/java/be/maximvdw/spigotsite/api/user/ConversationManager.java index 2e51fe3..727a19c 100644 --- a/src/main/java/be/maximvdw/spigotsite/api/user/ConversationManager.java +++ b/src/main/java/be/maximvdw/spigotsite/api/user/ConversationManager.java @@ -31,6 +31,19 @@ public List getConversations(User user, int count) public void replyToConversation(Conversation conversation, User user, String reply) throws SpamWarningException; + /** + * Set the unread status of a conversation + * + * @param conversation + * Conversation + * @param user + * Authenticated user + * @param unreadOrNot + * True to set unread, false to set read + */ + public void markAsUnread(Conversation conversation, User user, + boolean unreadOrNot) throws SpamWarningException; + /** * Leave a conversation *