Get the correct unread count for a conversation

This commit is contained in:
Josh Perez
2021-05-10 14:49:13 -04:00
committed by GitHub
parent c68d65ea0b
commit 887b2c1db1
5 changed files with 47 additions and 14 deletions

View File

@@ -343,6 +343,7 @@ export type ServerInterface = DataInterface & {
getNextTapToViewMessageToAgeOut: () => Promise<MessageType | undefined>;
getOutgoingWithoutExpiresAt: () => Promise<Array<MessageType>>;
getTapToViewMessagesNeedingErase: () => Promise<Array<MessageType>>;
getUnreadCountForConversation: (conversationId: string) => Promise<number>;
getUnreadByConversationAndMarkRead: (
conversationId: string,
newestUnreadId: number,
@@ -486,6 +487,7 @@ export type ClientInterface = DataInterface & {
getTapToViewMessagesNeedingErase: (options: {
MessageCollection: typeof MessageModelCollectionType;
}) => Promise<MessageModelCollectionType>;
getUnreadCountForConversation: (conversationId: string) => Promise<number>;
getUnreadByConversationAndMarkRead: (
conversationId: string,
newestUnreadId: number,