getTotalUnreadForConversation: Add missing isGroup parameter
This commit is contained in:
parent
5d65e3b36c
commit
25282e3afa
5 changed files with 43 additions and 13 deletions
|
@ -1170,9 +1170,12 @@ async function getMessageBySender({
|
|||
|
||||
async function getTotalUnreadForConversation(
|
||||
conversationId: string,
|
||||
storyId?: UUIDStringType
|
||||
options: {
|
||||
storyId: UUIDStringType | undefined;
|
||||
isGroup: boolean;
|
||||
}
|
||||
) {
|
||||
return channels.getTotalUnreadForConversation(conversationId, storyId);
|
||||
return channels.getTotalUnreadForConversation(conversationId, options);
|
||||
}
|
||||
|
||||
async function getUnreadByConversationAndMarkRead(options: {
|
||||
|
|
|
@ -384,7 +384,10 @@ export type DataInterface = {
|
|||
removeMessages: (ids: Array<string>) => Promise<void>;
|
||||
getTotalUnreadForConversation: (
|
||||
conversationId: string,
|
||||
storyId?: UUIDStringType
|
||||
options: {
|
||||
storyId: UUIDStringType | undefined;
|
||||
isGroup: boolean;
|
||||
}
|
||||
) => Promise<number>;
|
||||
getUnreadByConversationAndMarkRead: (options: {
|
||||
conversationId: string;
|
||||
|
|
|
@ -2700,14 +2700,22 @@ function getOldestUnseenMessageForConversation(
|
|||
|
||||
async function getTotalUnreadForConversation(
|
||||
conversationId: string,
|
||||
storyId?: UUIDStringType
|
||||
options: {
|
||||
storyId: UUIDStringType | undefined;
|
||||
isGroup: boolean;
|
||||
}
|
||||
): Promise<number> {
|
||||
return getTotalUnreadForConversationSync(conversationId, storyId);
|
||||
return getTotalUnreadForConversationSync(conversationId, options);
|
||||
}
|
||||
function getTotalUnreadForConversationSync(
|
||||
conversationId: string,
|
||||
storyId?: UUIDStringType,
|
||||
isGroup?: boolean
|
||||
{
|
||||
storyId,
|
||||
isGroup,
|
||||
}: {
|
||||
storyId: UUIDStringType | undefined;
|
||||
isGroup: boolean;
|
||||
}
|
||||
): number {
|
||||
const db = getInstance();
|
||||
const row = db
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue