example: cleanup
This commit is contained in:
+1
-4
@@ -1,10 +1,7 @@
|
||||
import { Boom } from '@hapi/boom'
|
||||
import NodeCache from '@cacheable/node-cache'
|
||||
import readline from 'readline'
|
||||
import makeWASocket, { AnyMessageContent, BinaryInfo, CacheStore, DEFAULT_CONNECTION_CONFIG, delay, DisconnectReason, downloadAndProcessHistorySyncNotification, encodeWAM, fetchLatestBaileysVersion, generateMessageIDV2, getAggregateVotesInPollMessage, getHistoryMsg, isJidNewsletter, jidDecode, makeCacheableSignalKeyStore, normalizeMessageContent, PatchedMessageWithRecipientJID, proto, useMultiFileAuthState, WAMessageContent, WAMessageKey } from '../src'
|
||||
//import MAIN_LOGGER from '../src/Utils/logger'
|
||||
import open from 'open'
|
||||
import fs from 'fs'
|
||||
import makeWASocket, { CacheStore, DEFAULT_CONNECTION_CONFIG, DisconnectReason, fetchLatestBaileysVersion, generateMessageIDV2, getAggregateVotesInPollMessage, isJidNewsletter, makeCacheableSignalKeyStore, proto, useMultiFileAuthState, WAMessageContent, WAMessageKey } from '../src'
|
||||
import P from 'pino'
|
||||
|
||||
const logger = P({
|
||||
|
||||
@@ -4,9 +4,9 @@ import { proto } from '../../WAProto/index.js'
|
||||
import type { Chat, Contact, LIDMapping, WAMessage } from '../Types'
|
||||
import { WAMessageStubType } from '../Types'
|
||||
import { toNumber } from './generics'
|
||||
import type { ILogger } from './logger.js'
|
||||
import { normalizeMessageContent } from './messages'
|
||||
import { downloadContentFromMessage } from './messages-media'
|
||||
import type { ILogger } from './logger.js'
|
||||
|
||||
const inflatePromise = promisify(inflate)
|
||||
|
||||
@@ -32,7 +32,7 @@ export const processHistoryMessage = (item: proto.IHistorySync, logger?: ILogger
|
||||
const chats: Chat[] = []
|
||||
const lidPnMappings: LIDMapping[] = []
|
||||
|
||||
logger?.trace({ progress: item.progress }, 'processing history of type '+ item.syncType?.toString())
|
||||
logger?.trace({ progress: item.progress }, 'processing history of type ' + item.syncType?.toString())
|
||||
|
||||
// Extract LID-PN mappings for all sync types
|
||||
for (const m of item.phoneNumberToLidMappings || []) {
|
||||
|
||||
Reference in New Issue
Block a user