feat: add media retry for MD

This commit is contained in:
Adhiraj Singh
2022-06-01 13:04:45 +05:30
parent 4c51800b09
commit 06ce5f9be0
4 changed files with 152 additions and 8 deletions

View File

@@ -1,3 +1,4 @@
import type { Boom } from '@hapi/boom'
import type EventEmitter from 'events'
import { proto } from '../../WAProto'
import { AuthenticationCreds } from './Auth'
@@ -33,6 +34,7 @@ export type BaileysEventMap<T> = {
'messages.delete': { keys: WAMessageKey[] } | { jid: string, all: true }
'messages.update': WAMessageUpdate[]
'messages.media-update': { key: WAMessageKey, media?: { ciphertext: Uint8Array, iv: Uint8Array }, error?: Boom }[]
/**
* add/update the given messages. If they were received while the connection was online,
* the update will have type: "notify"