New 'unseenStatus' field for certain secondary message types

This commit is contained in:
Scott Nonnenberg 2022-04-22 11:35:14 -07:00 committed by GitHub
parent ed9f54d7d6
commit 3a1df01c9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 610 additions and 143 deletions

View file

@ -8,11 +8,16 @@ import { readSyncJobQueue } from '../jobs/readSyncJobQueue';
import { notificationService } from '../services/notifications';
import { isGroup } from './whatTypeOfConversation';
import * as log from '../logging/log';
import { getConversationIdForLogging } from './idForLogging';
export async function markConversationRead(
conversationAttrs: ConversationAttributesType,
newestUnreadAt: number,
options: { readAt?: number; sendReadReceipts: boolean } = {
options: {
readAt?: number;
sendReadReceipts: boolean;
newestSentAt?: number;
} = {
sendReadReceipts: true,
}
): Promise<boolean> {
@ -32,7 +37,8 @@ export async function markConversationRead(
]);
log.info('markConversationRead', {
conversationId,
conversationId: getConversationIdForLogging(conversationAttrs),
newestSentAt: options.newestSentAt,
newestUnreadAt,
unreadMessages: unreadMessages.length,
unreadReactions: unreadReactions.length,