Преглед на файлове

GramJS: Fix missing message updates (#251)

painor преди 5 години
родител
ревизия
2879a06bcd
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      src/lib/gramjs/network/MTProtoSender.js

+ 3 - 3
src/lib/gramjs/network/MTProtoSender.js

@@ -331,7 +331,7 @@ class MTProtoSender {
             try {
                 await this._connection.send(data)
             } catch (e) {
-                console.log(e)
+                this._log.error(e)
                 this._log.info('Connection closed while sending data')
                 return
             }
@@ -442,8 +442,8 @@ class MTProtoSender {
 
         const toPop = []
 
-        for (state in this._pending_state) {
-            if (state.containerId === msgId) {
+        for (state of Object.values(this._pending_state)) {
+            if (state.containerId.equals(msgId)) {
                 toPop.push(state.msgId)
             }
         }