Socket-passthrough

This commit is contained in:
Rajeh Taher
2023-09-28 03:08:50 +03:00
committed by GitHub
parent cd8542ff7c
commit f50842fd7a
2 changed files with 3 additions and 1 deletions

View File

@@ -76,7 +76,7 @@ export const makeSocket = (config: SocketConfig) => {
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()

View File

@@ -115,4 +115,6 @@ export type SocketConfig = {
getMessage: (key: proto.IMessageKey) => Promise<proto.IMessage | undefined>
makeSignalRepository: (auth: SignalAuthState) => SignalRepository
socket: any
}