UNPKG

@vreden/meta

Version:

Baileys is a lightweight JavaScript library for interacting with the WhatsApp Web API using WebSocket.

24 lines (18 loc) 697 B
"use strict" Object.defineProperty(exports, "__esModule", { value: true }) const Defaults_1 = require("../Defaults") const community_1 = require("./community") // export the last socket layer const makeWASocket = (config) => { const newConfig = { ...Defaults_1.DEFAULT_CONNECTION_CONFIG, ...config } // If the user hasn't provided their own history sync function, // let's create a default one that respects the syncFullHistory flag. if (config.shouldSyncHistoryMessage === undefined) { newConfig.shouldSyncHistoryMessage = () => !!newConfig.syncFullHistory } return community_1.makeCommunitiesSocket(newConfig) } exports.default = makeWASocket