diff --git a/src/Socket/socket.ts b/src/Socket/socket.ts index 7dcd409..e08b045 100644 --- a/src/Socket/socket.ts +++ b/src/Socket/socket.ts @@ -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() diff --git a/src/Types/Socket.ts b/src/Types/Socket.ts index 51dd6f7..5d05e92 100644 --- a/src/Types/Socket.ts +++ b/src/Types/Socket.ts @@ -115,4 +115,6 @@ export type SocketConfig = { getMessage: (key: proto.IMessageKey) => Promise makeSignalRepository: (auth: SignalAuthState) => SignalRepository + + socket: any }