mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
feat: add legacy connection
This commit is contained in:
14
src/LegacySocket/index.ts
Normal file
14
src/LegacySocket/index.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { LegacySocketConfig } from '../Types'
|
||||
import { DEFAULT_LEGACY_CONNECTION_CONFIG } from '../Defaults'
|
||||
import _makeConnection from './groups'
|
||||
// export the last socket layer
|
||||
const makeConnection = (config: Partial<LegacySocketConfig>) => (
|
||||
_makeConnection({
|
||||
...DEFAULT_LEGACY_CONNECTION_CONFIG,
|
||||
...config
|
||||
})
|
||||
)
|
||||
|
||||
export type Connection = ReturnType<typeof makeConnection>
|
||||
|
||||
export default makeConnection
|
||||
Reference in New Issue
Block a user