浏览代码

Update version

Painor 7 月之前
父节点
当前提交
ab85b0344a

+ 1 - 1
gramjs/Version.ts

@@ -1 +1 @@
-export const version = "2.25.7";
+export const version = "2.25.8";

+ 1 - 1
gramjs/client/telegramBaseClient.ts

@@ -284,7 +284,7 @@ export abstract class TelegramBaseClient {
         }
         this._connection = clientParams.connection;
         let initProxy;
-        if (this._proxy && 'MTProxy' in this._proxy) {
+        if (this._proxy && "MTProxy" in this._proxy) {
             this._connection = ConnectionTCPMTProxyAbridged;
             initProxy = new Api.InputClientProxy({
                 address: this._proxy.ip,

+ 5 - 2
gramjs/extensions/PromisedNetSockets.ts

@@ -2,7 +2,10 @@ import * as net from "./net";
 import { SocksClient } from "./socks";
 
 import { Mutex } from "async-mutex";
-import { ProxyInterface, SocksProxyType } from "../network/connection/TCPMTProxy";
+import {
+    ProxyInterface,
+    SocksProxyType,
+} from "../network/connection/TCPMTProxy";
 
 const mutex = new Mutex();
 
@@ -22,7 +25,7 @@ export class PromisedNetSockets {
         this.stream = Buffer.alloc(0);
         if (proxy) {
             // we only want to use this when it's not an MTProto proxy.
-            if (!('MTProxy' in proxy)) {
+            if (!("MTProxy" in proxy)) {
                 if (!proxy.ip || !proxy.port || !proxy.socksType) {
                     throw new Error(
                         `Invalid sockets params: ip=${proxy.ip}, port=${proxy.port}, socksType=${proxy.socksType}`

+ 3 - 3
gramjs/network/connection/TCPMTProxy.ts

@@ -18,10 +18,10 @@ interface BasicProxyInterface {
 export type MTProxyType = BasicProxyInterface & {
     secret: string;
     MTProxy: true;
-}
+};
 export type SocksProxyType = BasicProxyInterface & {
     socksType: 4 | 5;
-}
+};
 
 export type ProxyInterface = MTProxyType | SocksProxyType;
 
@@ -160,7 +160,7 @@ export class TCPMTProxy extends ObfuscatedConnection {
             proxy: proxy,
             testServers: testServers,
         });
-        if (!('MTProxy' in proxy)) {
+        if (!("MTProxy" in proxy)) {
             throw new Error("This connection only supports MPTProxies");
         }
         if (!proxy.secret) {

+ 2 - 2
package-lock.json

@@ -1,12 +1,12 @@
 {
   "name": "telegram",
-  "version": "2.25.4",
+  "version": "2.25.9",
   "lockfileVersion": 2,
   "requires": true,
   "packages": {
     "": {
       "name": "telegram",
-      "version": "2.25.4",
+      "version": "2.25.9",
       "license": "MIT",
       "dependencies": {
         "@cryptography/aes": "^0.1.1",

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "telegram",
-  "version": "2.25.7",
+  "version": "2.25.9",
   "description": "NodeJS/Browser MTProto API Telegram client library,",
   "main": "index.js",
   "types": "index.d.ts",