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
Unread count #42
Unread count #42
Conversation
backend/api/conversations/src/main/java/co/airy/core/api/conversations/Stores.java
Show resolved
Hide resolved
|
||
unreadCountTable.toStream() | ||
.peek((conversationId, unreadCountState) -> { | ||
// TODO send to websocket queue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pending the websocket PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 NICE
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class UnreadCountState implements Serializable { | ||
HashSet<Long> messageSentDates = new HashSet<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set<Long>
for the declaration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's good stuff!
"type": "record", | ||
"fields": [ | ||
{"name": "conversationId", "type": "string"}, | ||
{"name": "lastReadDate", "type": "long", "logicalType": "timestamp-millis"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd call this field readAt
(so that it stays in sync with common industry conventions, like sentAt
and such)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass! Looking good.... I'm unsure about the current naming (I suggested something) but apart from that I think it's good to go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addresses #39