Skip to content

Add the ability to mark read status of conversations. #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/main/java/be/maximvdw/spigotsite/api/user/Conversation.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@ public List<Conversation> 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
*
Expand Down