From c4c22c9628d918f7bda5fc0e8266acd8c0eaf842 Mon Sep 17 00:00:00 2001 From: Rajeh Taher Date: Sun, 18 Jan 2026 17:26:17 +0200 Subject: [PATCH] example: customizable socket URL --- Example/example.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Example/example.ts b/Example/example.ts index 488f89c5..de271f3d 100644 --- a/Example/example.ts +++ b/Example/example.ts @@ -1,7 +1,7 @@ import { Boom } from '@hapi/boom' import NodeCache from '@cacheable/node-cache' import readline from 'readline' -import makeWASocket, { AnyMessageContent, BinaryInfo, CacheStore, delay, DisconnectReason, downloadAndProcessHistorySyncNotification, encodeWAM, fetchLatestBaileysVersion, generateMessageIDV2, getAggregateVotesInPollMessage, getHistoryMsg, isJidNewsletter, jidDecode, makeCacheableSignalKeyStore, normalizeMessageContent, PatchedMessageWithRecipientJID, proto, useMultiFileAuthState, WAMessageContent, WAMessageKey } from '../src' +import makeWASocket, { AnyMessageContent, BinaryInfo, CacheStore, DEFAULT_CONNECTION_CONFIG, delay, DisconnectReason, downloadAndProcessHistorySyncNotification, encodeWAM, fetchLatestBaileysVersion, generateMessageIDV2, getAggregateVotesInPollMessage, getHistoryMsg, isJidNewsletter, jidDecode, makeCacheableSignalKeyStore, normalizeMessageContent, PatchedMessageWithRecipientJID, proto, useMultiFileAuthState, WAMessageContent, WAMessageKey } from '../src' //import MAIN_LOGGER from '../src/Utils/logger' import open from 'open' import fs from 'fs' @@ -49,6 +49,7 @@ const startSock = async() => { const sock = makeWASocket({ version, logger, + waWebSocketUrl: process.env.SOCKET_URL ?? DEFAULT_CONNECTION_CONFIG.waWebSocketUrl, auth: { creds: state.creds, /** caching makes the store faster to send/recv messages */