Explorar el Código

Fix resolving ping request

painor hace 4 años
padre
commit
803c18bd25
Se han modificado 3 ficheros con 5 adiciones y 5 borrados
  1. 1 1
      gramjs/Version.ts
  2. 3 3
      gramjs/network/MTProtoSender.ts
  3. 1 1
      package.json

+ 1 - 1
gramjs/Version.ts

@@ -1 +1 @@
-export const version = "1.7.21";
+export const version = "1.7.23";

+ 3 - 3
gramjs/network/MTProtoSender.ts

@@ -500,7 +500,7 @@ export class MTProtoSender {
      */
      */
     async _processMessage(message: TLMessage) {
     async _processMessage(message: TLMessage) {
         this._pendingAck.add(message.msgId);
         this._pendingAck.add(message.msgId);
-        // eslint-disable-next-line require-atomic-updates
+
         message.obj = await message.obj;
         message.obj = await message.obj;
         let handler = this._handlers[message.obj.CONSTRUCTOR_ID.toString()];
         let handler = this._handlers[message.obj.CONSTRUCTOR_ID.toString()];
         if (!handler) {
         if (!handler) {
@@ -657,8 +657,8 @@ export class MTProtoSender {
     async _handlePong(message: TLMessage) {
     async _handlePong(message: TLMessage) {
         const pong = message.obj;
         const pong = message.obj;
         this._log.debug(`Handling pong for message ${pong.msgId}`);
         this._log.debug(`Handling pong for message ${pong.msgId}`);
-        const state = this._pendingState.get(pong.msgId);
-        this._pendingState.delete(pong.msgId);
+        const state = this._pendingState.get(pong.msgId.toString());
+        this._pendingState.delete(pong.msgId.toString());
 
 
         // Todo Check result
         // Todo Check result
         if (state) {
         if (state) {

+ 1 - 1
package.json

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