From 50366276730a8c1deeaa3fa59a173caccd2391b6 Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Sun, 28 May 2023 14:32:50 +0200 Subject: [PATCH] Do not save `typingStatus` in cache --- src/global/cache.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/global/cache.ts b/src/global/cache.ts index a5f7dd96a..b3000fe81 100644 --- a/src/global/cache.ts +++ b/src/global/cache.ts @@ -561,11 +561,12 @@ function reduceMessages(global: T): GlobalState['messages ? Object.values(chat.topics).map(({ lastMessageId }) => lastMessageId) : []; const byId = pick(current.byId, viewportIdsToSave.concat(lastMessageIdsToSave)); const threadsById = Object.keys(threadsToSave).reduce((acc, key) => { - const t = threadsToSave[Number(key)]; + const thread = threadsToSave[Number(key)]; acc[Number(key)] = { - ...t, - listedIds: t.lastViewportIds, + ...thread, + listedIds: thread.lastViewportIds, pinnedIds: undefined, + typingStatus: undefined, }; return acc; }, {} as GlobalState['messages']['byChatId'][string]['threadsById']);