mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
proto: update manually to 2.3000.1020608496
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import NodeCache from '@cacheable/node-cache'
|
||||
import { Boom } from '@hapi/boom'
|
||||
import { randomBytes } from 'crypto'
|
||||
import Long = require('long');
|
||||
import { proto } from '../../WAProto'
|
||||
import { DEFAULT_CACHE_TTLS, KEY_BUNDLE_TYPE, MIN_PREKEY_COUNT } from '../Defaults'
|
||||
import { MessageReceiptType, MessageRelayOptions, MessageUserReceipt, SocketConfig, WACallEvent, WAMessageKey, WAMessageStatus, WAMessageStubType, WAPatchName } from '../Types'
|
||||
@@ -846,7 +847,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
||||
throw new Boom('Not authenticated')
|
||||
}
|
||||
|
||||
const pdoMessage = {
|
||||
const pdoMessage: proto.Message.IPeerDataOperationRequestMessage = {
|
||||
historySyncOnDemandRequest: {
|
||||
chatJid: oldestMsgKey.remoteJid,
|
||||
oldestMsgFromMe: oldestMsgKey.fromMe,
|
||||
|
||||
@@ -669,15 +669,15 @@ export const makeMessagesSocket = (config: SocketConfig) => {
|
||||
try {
|
||||
const media = await decryptMediaRetryData(result.media!, mediaKey, result.key.id!)
|
||||
if(media.result !== proto.MediaRetryNotification.ResultType.SUCCESS) {
|
||||
const resultStr = proto.MediaRetryNotification.ResultType[media.result]
|
||||
const resultStr = proto.MediaRetryNotification.ResultType[media.result!]
|
||||
throw new Boom(
|
||||
`Media re-upload failed by device (${resultStr})`,
|
||||
{ data: media, statusCode: getStatusCodeForMediaRetry(media.result) || 404 }
|
||||
{ data: media, statusCode: getStatusCodeForMediaRetry(media.result!) || 404 }
|
||||
)
|
||||
}
|
||||
|
||||
content.directPath = media.directPath
|
||||
content.url = getUrlFromDirectPath(content.directPath)
|
||||
content.url = getUrlFromDirectPath(content.directPath!)
|
||||
|
||||
logger.debug({ directPath: media.directPath, key: result.key }, 'media update successful')
|
||||
} catch(err) {
|
||||
|
||||
Reference in New Issue
Block a user