mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
chore: remove legacy code
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { CommonSocketConfig, LegacySocketConfig, MediaType, SocketConfig } from '../Types'
|
||||
import type { MediaType, SocketConfig } from '../Types'
|
||||
import { Browsers } from '../Utils'
|
||||
import logger from '../Utils/logger'
|
||||
import { version } from './baileys-version.json'
|
||||
@@ -26,10 +26,9 @@ export const WA_CERT_DETAILS = {
|
||||
SERIAL: 0,
|
||||
}
|
||||
|
||||
const BASE_CONNECTION_CONFIG: CommonSocketConfig = {
|
||||
export const DEFAULT_CONNECTION_CONFIG: SocketConfig = {
|
||||
version: version as any,
|
||||
browser: Browsers.baileys('Chrome'),
|
||||
|
||||
waWebSocketUrl: 'wss://web.whatsapp.com/ws/chat',
|
||||
connectTimeoutMs: 20_000,
|
||||
keepAliveIntervalMs: 15_000,
|
||||
@@ -38,11 +37,7 @@ const BASE_CONNECTION_CONFIG: CommonSocketConfig = {
|
||||
emitOwnEvents: true,
|
||||
defaultQueryTimeoutMs: 60_000,
|
||||
customUploadHosts: [],
|
||||
retryRequestDelayMs: 250
|
||||
}
|
||||
|
||||
export const DEFAULT_CONNECTION_CONFIG: SocketConfig = {
|
||||
...BASE_CONNECTION_CONFIG,
|
||||
retryRequestDelayMs: 250,
|
||||
fireInitQueries: true,
|
||||
auth: undefined as any,
|
||||
downloadHistory: true,
|
||||
@@ -54,13 +49,6 @@ export const DEFAULT_CONNECTION_CONFIG: SocketConfig = {
|
||||
getMessage: async() => undefined
|
||||
}
|
||||
|
||||
export const DEFAULT_LEGACY_CONNECTION_CONFIG: LegacySocketConfig = {
|
||||
...BASE_CONNECTION_CONFIG,
|
||||
waWebSocketUrl: 'wss://web.whatsapp.com/ws',
|
||||
phoneResponseTimeMs: 20_000,
|
||||
expectResponseTimeout: 60_000,
|
||||
}
|
||||
|
||||
export const MEDIA_PATH_MAP: { [T in MediaType]?: string } = {
|
||||
image: '/mms/image',
|
||||
video: '/mms/video',
|
||||
|
||||
Reference in New Issue
Block a user