chore: move version to JSON file

This commit is contained in:
Adhiraj Singh
2022-02-20 19:31:47 +05:30
parent 14caf354dd
commit 7c5071d8d5
2 changed files with 5 additions and 1 deletions

View File

@@ -0,0 +1,3 @@
{
"version": [2, 2204, 13]
}

View File

@@ -1,6 +1,7 @@
import P from 'pino'
import type { CommonSocketConfig, LegacySocketConfig, MediaType, SocketConfig } from '../Types'
import { Browsers } from '../Utils'
import { version } from './baileys-version.json'
export const UNAUTHORIZED_CODES = [401, 403, 419]
@@ -18,7 +19,7 @@ export const NOISE_WA_HEADER = new Uint8Array([87, 65, 5, 2]) // last is "DICT_V
export const URL_REGEX = /[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)?/gi
const BASE_CONNECTION_CONFIG: CommonSocketConfig<any> = {
version: [2, 2204, 13],
version: version as any,
browser: Browsers.baileys('Chrome'),
waWebSocketUrl: 'wss://web.whatsapp.com/ws/chat',