separate data structure for presence

This commit is contained in:
Adhiraj Singh
2021-08-24 11:00:37 +05:30
parent 48f477e0c1
commit 8a014df1c5
5 changed files with 32 additions and 36 deletions

View File

@@ -11,7 +11,7 @@ import type { Logger } from "pino"
import type { URL } from "url"
import type BinaryNode from "../BinaryNode"
import { AnyAuthenticationCredentials, AuthenticationCredentials } from './Auth'
import { Chat } from './Chat'
import { Chat, PresenceData } from './Chat'
import { Contact } from './Contact'
import { ConnectionState } from './Store'
@@ -176,6 +176,8 @@ export type BaileysEventMap = {
'chats.update': Partial<Chat>[]
'chats.delete': string[]
'presence.update': { jid: string, presences: { [participant: string]: PresenceData } }
'contacts.set': { contacts: Contact[] }
'contacts.upsert': Contact[]
'contacts.update': Partial<Contact>[]