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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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,