From 24af2dabfba1cb35413caaedcd923f8e991cec96 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Fri, 7 Oct 2022 16:28:54 +1100 Subject: [PATCH] fix: remove usused onReadMessage method --- ts/models/conversation.ts | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/ts/models/conversation.ts b/ts/models/conversation.ts index 3795f5720..19d816f1b 100644 --- a/ts/models/conversation.ts +++ b/ts/models/conversation.ts @@ -471,26 +471,6 @@ export class ConversationModel extends Backbone.Model { return true; } - public async onReadMessage(message: MessageModel, readAt: number) { - // We mark as read everything older than this message - to clean up old stuff - // still marked unread in the database. If the user generally doesn't read in - // the desktop app, so the desktop app only gets read syncs, we can very - // easily end up with messages never marked as read (our previous early read - // sync handling, read syncs never sent because app was offline) - - // We queue it because we often get a whole lot of read syncs at once, and - // their markRead calls could very easily overlap given the async pull from DB. - - // Lastly, we don't send read syncs for any message marked read due to a read - // sync. That's a notification explosion we don't need. - return this.queueJob(() => - this.markReadBouncy(message.get('received_at') as any, { - sendReadReceipts: false, - readAt, - }) - ); - } - public async getUnreadCount() { const unreadCount = await Data.getUnreadCountByConversation(this.id);