mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
implement chat modifications
This commit is contained in:
@@ -10,11 +10,11 @@ export interface PresenceData {
|
||||
lastSeen?: number
|
||||
}
|
||||
|
||||
export type ChatMutation = { action: proto.ISyncActionValue, index: [string, string], indexMac: Uint8Array, valueMac: Uint8Array, operation: number }
|
||||
export type ChatMutation = { action: proto.ISyncActionValue, index: string[], indexMac: Uint8Array, valueMac: Uint8Array, operation: number }
|
||||
|
||||
export type WAPatchCreate = {
|
||||
syncAction: proto.ISyncActionValue
|
||||
index: [string, string]
|
||||
index: string[]
|
||||
type: WAPatchName
|
||||
apiVersion: number
|
||||
}
|
||||
@@ -38,7 +38,7 @@ export type ChatModification =
|
||||
mute: number | null
|
||||
} |
|
||||
{
|
||||
clear: 'all' | { messages: { id: string, fromMe?: boolean }[] }
|
||||
clear: 'all' | { message: {id: string, fromMe?: boolean} }
|
||||
} |
|
||||
{
|
||||
star: {
|
||||
|
||||
@@ -16,7 +16,7 @@ import { Contact } from './Contact'
|
||||
import { ConnectionState } from './State'
|
||||
|
||||
import { GroupMetadata, ParticipantAction } from './GroupMetadata'
|
||||
import { MessageInfoUpdate, MessageUpdateType, WAMessage, WAMessageUpdate } from './Message'
|
||||
import { MessageInfoUpdate, MessageUpdateType, WAMessage, WAMessageUpdate, WAMessageKey } from './Message'
|
||||
|
||||
export type WAVersion = [number, number, number]
|
||||
export type WABrowserDescription = [string, string, string]
|
||||
@@ -103,7 +103,7 @@ export type BaileysEventMap = {
|
||||
'contacts.upsert': Contact[]
|
||||
'contacts.update': Partial<Contact>[]
|
||||
|
||||
'messages.delete': { jid: string, ids: string[] } | { jid: string, all: true }
|
||||
'messages.delete': { keys: WAMessageKey[] } | { jid: string, all: true }
|
||||
'messages.update': WAMessageUpdate[]
|
||||
/**
|
||||
* add/update the given messages. If they were received while the connection was online,
|
||||
|
||||
Reference in New Issue
Block a user