@mtkruto/node 0.0.61 → 0.0.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,7 +14,7 @@ const dcToNameMap = {
14
14
  export const defaultTransportProvider = (params) => {
15
15
  return (cdn) => {
16
16
  const { dc, wss = typeof location !== "undefined" && location.protocol == "http:" ? false : true } = params ?? { dc: defaultDc };
17
- const url = `${wss ? "wss" : "ws"}://${dcToNameMap[dc]}${cdn ? "-1" : ""}.telegram.org/${dc.endsWith("-test") ? "apiws_test" : "apiws"}`;
17
+ const url = `${wss ? "wss" : "ws"}://${dcToNameMap[dc]}${cdn ? "-1" : ""}.web.telegram.org/${dc.endsWith("-test") ? "apiws_test" : "apiws"}`;
18
18
  const connection = new ConnectionWebSocket(url);
19
19
  const transport = new TransportIntermediate(connection, true);
20
20
  const dcId = Number(dc[0]) + (dc.endsWith("-test") ? 10000 : 0) * (cdn ? -1 : 1);
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "main": "./script/mod.js",
4
4
  "types": "./types/mod.d.ts",
5
5
  "name": "@mtkruto/node",
6
- "version": "0.0.61",
6
+ "version": "0.0.62",
7
7
  "description": "MTKruto for Node.js",
8
8
  "author": "Roj <rojvv@icloud.com>",
9
9
  "license": "LGPL-3.0-or-later",
@@ -17,7 +17,7 @@ const dcToNameMap = {
17
17
  const defaultTransportProvider = (params) => {
18
18
  return (cdn) => {
19
19
  const { dc, wss = typeof location !== "undefined" && location.protocol == "http:" ? false : true } = params ?? { dc: exports.defaultDc };
20
- const url = `${wss ? "wss" : "ws"}://${dcToNameMap[dc]}${cdn ? "-1" : ""}.telegram.org/${dc.endsWith("-test") ? "apiws_test" : "apiws"}`;
20
+ const url = `${wss ? "wss" : "ws"}://${dcToNameMap[dc]}${cdn ? "-1" : ""}.web.telegram.org/${dc.endsWith("-test") ? "apiws_test" : "apiws"}`;
21
21
  const connection = new connection_web_socket_js_1.ConnectionWebSocket(url);
22
22
  const transport = new transport_intermediate_js_1.TransportIntermediate(connection, true);
23
23
  const dcId = Number(dc[0]) + (dc.endsWith("-test") ? 10000 : 0) * (cdn ? -1 : 1);