From bfde86bce75a272f15d4ef65c33737c7f12252c6 Mon Sep 17 00:00:00 2001 From: Rajeh Taher Date: Thu, 22 Jan 2026 14:34:54 +0200 Subject: [PATCH] example: cleanup --- Example/example.ts | 5 +---- src/Utils/history.ts | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Example/example.ts b/Example/example.ts index 782039ff..8925862c 100644 --- a/Example/example.ts +++ b/Example/example.ts @@ -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({ diff --git a/src/Utils/history.ts b/src/Utils/history.ts index ff7207e1..5e94daa0 100644 --- a/src/Utils/history.ts +++ b/src/Utils/history.ts @@ -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 || []) {