mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Socket-passthrough
This commit is contained in:
@@ -76,7 +76,7 @@ export const makeSocket = (config: SocketConfig) => {
|
|||||||
url = new URL(`tcp://${MOBILE_ENDPOINT}:${MOBILE_PORT}`)
|
url = new URL(`tcp://${MOBILE_ENDPOINT}:${MOBILE_PORT}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
const ws = config.mobile ? new MobileSocketClient(url, config) : new WebSocketClient(url, config)
|
const ws = config.socket ? config.socket : config.mobile ? new MobileSocketClient(url, config) : new WebSocketClient(url, config)
|
||||||
|
|
||||||
ws.connect()
|
ws.connect()
|
||||||
|
|
||||||
|
|||||||
@@ -115,4 +115,6 @@ export type SocketConfig = {
|
|||||||
getMessage: (key: proto.IMessageKey) => Promise<proto.IMessage | undefined>
|
getMessage: (key: proto.IMessageKey) => Promise<proto.IMessage | undefined>
|
||||||
|
|
||||||
makeSignalRepository: (auth: SignalAuthState) => SignalRepository
|
makeSignalRepository: (auth: SignalAuthState) => SignalRepository
|
||||||
|
|
||||||
|
socket: any
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user