feat: track history being stored

This is done because sometimes we receive history after the first connect too, and to ensure the "isLatest" flag is accurate -- we ensure no history was received previously
This commit is contained in:
Adhiraj Singh
2022-06-07 21:18:51 +05:30
parent ea8b580db8
commit 5305730d82
7 changed files with 32 additions and 13 deletions

View File

@@ -1,5 +1,6 @@
import type { proto } from '../../WAProto'
import type { Contact } from './Contact'
import type { MinimalMessage } from './Message'
export type KeyPair = { public: Uint8Array, private: Uint8Array }
export type SignedKeyPair = { keyPair: KeyPair, signature: Uint8Array, keyId: number }
@@ -45,6 +46,8 @@ export type AuthenticationCreds = SignalCreds & {
lastAccountSyncTimestamp?: number
platform?: string
processedHistoryMessages: MinimalMessage[]
accountSettings: AccountSettings
}