@mtcute/core 0.27.5 → 0.27.6
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.
|
@@ -42,7 +42,12 @@ class MtprotoSession {
|
|
|
42
42
|
queuedStateReq = [];
|
|
43
43
|
queuedResendReq = [];
|
|
44
44
|
queuedCancelReq = [];
|
|
45
|
-
getStateSchedule = new sortedArray.SortedArray([], (a, b) =>
|
|
45
|
+
getStateSchedule = new sortedArray.SortedArray([], (a, b) => {
|
|
46
|
+
const diff = a.getState - b.getState;
|
|
47
|
+
if (diff !== 0) return diff;
|
|
48
|
+
if (a.msgId && b.msgId) return a.msgId.compare(b.msgId);
|
|
49
|
+
return 0;
|
|
50
|
+
});
|
|
46
51
|
pendingGetStateTimeouts = new longUtils.LongMap();
|
|
47
52
|
chains = /* @__PURE__ */ new Map();
|
|
48
53
|
chainsPendingFails = /* @__PURE__ */ new Map();
|
|
@@ -35,7 +35,12 @@ class MtprotoSession {
|
|
|
35
35
|
queuedStateReq = [];
|
|
36
36
|
queuedResendReq = [];
|
|
37
37
|
queuedCancelReq = [];
|
|
38
|
-
getStateSchedule = new SortedArray([], (a, b) =>
|
|
38
|
+
getStateSchedule = new SortedArray([], (a, b) => {
|
|
39
|
+
const diff = a.getState - b.getState;
|
|
40
|
+
if (diff !== 0) return diff;
|
|
41
|
+
if (a.msgId && b.msgId) return a.msgId.compare(b.msgId);
|
|
42
|
+
return 0;
|
|
43
|
+
});
|
|
39
44
|
pendingGetStateTimeouts = new LongMap();
|
|
40
45
|
chains = /* @__PURE__ */ new Map();
|
|
41
46
|
chainsPendingFails = /* @__PURE__ */ new Map();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mtcute/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.27.
|
|
4
|
+
"version": "0.27.6",
|
|
5
5
|
"description": "Type-safe library for MTProto (Telegram API)",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"scripts": {},
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"@fuman/io": "0.0.17",
|
|
10
10
|
"@fuman/net": "0.0.17",
|
|
11
11
|
"@fuman/utils": "0.0.17",
|
|
12
|
-
"@mtcute/file-id": "^0.27.
|
|
12
|
+
"@mtcute/file-id": "^0.27.6",
|
|
13
13
|
"@mtcute/tl": "^221.0.0",
|
|
14
14
|
"@mtcute/tl-runtime": "^0.24.3",
|
|
15
15
|
"@types/events": "3.0.0",
|
package/utils/sorted-array.cjs
CHANGED