mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
chore: move version to JSON file
This commit is contained in:
3
src/Defaults/baileys-version.json
Normal file
3
src/Defaults/baileys-version.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"version": [2, 2204, 13]
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
import P from 'pino'
|
import P from 'pino'
|
||||||
import type { CommonSocketConfig, LegacySocketConfig, MediaType, SocketConfig } from '../Types'
|
import type { CommonSocketConfig, LegacySocketConfig, MediaType, SocketConfig } from '../Types'
|
||||||
import { Browsers } from '../Utils'
|
import { Browsers } from '../Utils'
|
||||||
|
import { version } from './baileys-version.json'
|
||||||
|
|
||||||
export const UNAUTHORIZED_CODES = [401, 403, 419]
|
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
|
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> = {
|
const BASE_CONNECTION_CONFIG: CommonSocketConfig<any> = {
|
||||||
version: [2, 2204, 13],
|
version: version as any,
|
||||||
browser: Browsers.baileys('Chrome'),
|
browser: Browsers.baileys('Chrome'),
|
||||||
|
|
||||||
waWebSocketUrl: 'wss://web.whatsapp.com/ws/chat',
|
waWebSocketUrl: 'wss://web.whatsapp.com/ws/chat',
|
||||||
|
|||||||
Reference in New Issue
Block a user