@mtkruto/browser 0.0.952 → 0.0.954
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.
- package/esm/client/3_client.js +8 -1
- package/esm/constants.d.ts +1 -1
- package/esm/constants.js +1 -1
- package/esm/mod.d.ts +1 -1
- package/esm/mod.js +1 -1
- package/package.json +1 -1
- package/script/client/3_client.js +8 -1
- package/script/constants.d.ts +1 -1
- package/script/constants.js +1 -1
- package/script/mod.d.ts +1 -1
- package/script/mod.js +2 -1
package/esm/client/3_client.js
CHANGED
|
@@ -818,7 +818,14 @@ export class Client extends ClientAbstract {
|
|
|
818
818
|
await this.storage.setState(localState);
|
|
819
819
|
}
|
|
820
820
|
else {
|
|
821
|
-
|
|
821
|
+
await this.fetchState("getLocalState");
|
|
822
|
+
if (this.updateState) {
|
|
823
|
+
localState = this.updateState;
|
|
824
|
+
await this.storage.setState(localState);
|
|
825
|
+
}
|
|
826
|
+
else {
|
|
827
|
+
UNREACHABLE();
|
|
828
|
+
}
|
|
822
829
|
}
|
|
823
830
|
}
|
|
824
831
|
return localState;
|
package/esm/constants.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const publicKeys: Map<bigint, [bigint, bigint]>;
|
|
|
4
4
|
export declare const VECTOR_CONSTRUCTOR = 481674261;
|
|
5
5
|
export declare const DEFAULT_INITIAL_DC: DC;
|
|
6
6
|
export declare const LAYER = 158;
|
|
7
|
-
export declare const DEFAULT_APP_VERSION = "MTKruto 0.0.
|
|
7
|
+
export declare const DEFAULT_APP_VERSION = "MTKruto 0.0.954";
|
|
8
8
|
export declare const DEFAULT_DEVICE_MODEL: string;
|
|
9
9
|
export declare const DEFAULT_LANG_CODE: string;
|
|
10
10
|
export declare const DEFAULT_LANG_PACK = "";
|
package/esm/constants.js
CHANGED
|
@@ -61,7 +61,7 @@ export const publicKeys = new Map([
|
|
|
61
61
|
export const VECTOR_CONSTRUCTOR = 0x1CB5C415;
|
|
62
62
|
export const DEFAULT_INITIAL_DC = "2-test";
|
|
63
63
|
export const LAYER = 158;
|
|
64
|
-
export const DEFAULT_APP_VERSION = "MTKruto 0.0.
|
|
64
|
+
export const DEFAULT_APP_VERSION = "MTKruto 0.0.954";
|
|
65
65
|
// @ts-ignore: lib
|
|
66
66
|
export const DEFAULT_DEVICE_MODEL = typeof Deno === "undefined" ? typeof navigator === "undefined" ? typeof process === "undefined" ? "Unknown" : process.platform + "-" + process.arch : navigator.userAgent.split(" ")[0] : Deno.build.os + "-" + Deno.build.arch;
|
|
67
67
|
export const DEFAULT_LANG_CODE = typeof navigator === "undefined" ? "en" : navigator.language.split("-")[0];
|
package/esm/mod.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const utils: {
|
|
|
4
4
|
checkPassword: typeof checkPassword;
|
|
5
5
|
getRandomId: typeof getRandomId;
|
|
6
6
|
};
|
|
7
|
-
export { as } from "./tl/1_tl_object.js";
|
|
7
|
+
export { as, serialize } from "./tl/1_tl_object.js";
|
|
8
8
|
export * as types from "./tl/2_types.js";
|
|
9
9
|
export * as functions from "./tl/3_functions.js";
|
|
10
10
|
export * from "./tl/5_rpc_result.js";
|
package/esm/mod.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getRandomId } from "./utilities/0_bigint.js";
|
|
2
2
|
import { checkPassword } from "./client/0_password.js";
|
|
3
3
|
export const utils = { checkPassword, getRandomId };
|
|
4
|
-
export { as } from "./tl/1_tl_object.js";
|
|
4
|
+
export { as, serialize } from "./tl/1_tl_object.js";
|
|
5
5
|
export * as types from "./tl/2_types.js";
|
|
6
6
|
export * as functions from "./tl/3_functions.js";
|
|
7
7
|
export * from "./tl/5_rpc_result.js";
|
package/package.json
CHANGED
|
@@ -844,7 +844,14 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
844
844
|
await this.storage.setState(localState);
|
|
845
845
|
}
|
|
846
846
|
else {
|
|
847
|
-
|
|
847
|
+
await this.fetchState("getLocalState");
|
|
848
|
+
if (this.updateState) {
|
|
849
|
+
localState = this.updateState;
|
|
850
|
+
await this.storage.setState(localState);
|
|
851
|
+
}
|
|
852
|
+
else {
|
|
853
|
+
(0, _0_control_js_1.UNREACHABLE)();
|
|
854
|
+
}
|
|
848
855
|
}
|
|
849
856
|
}
|
|
850
857
|
return localState;
|
package/script/constants.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const publicKeys: Map<bigint, [bigint, bigint]>;
|
|
|
4
4
|
export declare const VECTOR_CONSTRUCTOR = 481674261;
|
|
5
5
|
export declare const DEFAULT_INITIAL_DC: DC;
|
|
6
6
|
export declare const LAYER = 158;
|
|
7
|
-
export declare const DEFAULT_APP_VERSION = "MTKruto 0.0.
|
|
7
|
+
export declare const DEFAULT_APP_VERSION = "MTKruto 0.0.954";
|
|
8
8
|
export declare const DEFAULT_DEVICE_MODEL: string;
|
|
9
9
|
export declare const DEFAULT_LANG_CODE: string;
|
|
10
10
|
export declare const DEFAULT_LANG_PACK = "";
|
package/script/constants.js
CHANGED
|
@@ -64,7 +64,7 @@ exports.publicKeys = new Map([
|
|
|
64
64
|
exports.VECTOR_CONSTRUCTOR = 0x1CB5C415;
|
|
65
65
|
exports.DEFAULT_INITIAL_DC = "2-test";
|
|
66
66
|
exports.LAYER = 158;
|
|
67
|
-
exports.DEFAULT_APP_VERSION = "MTKruto 0.0.
|
|
67
|
+
exports.DEFAULT_APP_VERSION = "MTKruto 0.0.954";
|
|
68
68
|
// @ts-ignore: lib
|
|
69
69
|
exports.DEFAULT_DEVICE_MODEL = typeof Deno === "undefined" ? typeof navigator === "undefined" ? typeof process === "undefined" ? "Unknown" : process.platform + "-" + process.arch : navigator.userAgent.split(" ")[0] : Deno.build.os + "-" + Deno.build.arch;
|
|
70
70
|
exports.DEFAULT_LANG_CODE = typeof navigator === "undefined" ? "en" : navigator.language.split("-")[0];
|
package/script/mod.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const utils: {
|
|
|
4
4
|
checkPassword: typeof checkPassword;
|
|
5
5
|
getRandomId: typeof getRandomId;
|
|
6
6
|
};
|
|
7
|
-
export { as } from "./tl/1_tl_object.js";
|
|
7
|
+
export { as, serialize } from "./tl/1_tl_object.js";
|
|
8
8
|
export * as types from "./tl/2_types.js";
|
|
9
9
|
export * as functions from "./tl/3_functions.js";
|
|
10
10
|
export * from "./tl/5_rpc_result.js";
|
package/script/mod.js
CHANGED
|
@@ -26,12 +26,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
26
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.LAYER = exports.DEFAULT_SYSTEM_VERSION = exports.DEFAULT_SYSTEM_LANG_CODE = exports.DEFAULT_LANG_PACK = exports.DEFAULT_LANG_CODE = exports.DEFAULT_INITIAL_DC = exports.DEFAULT_DEVICE_MODEL = exports.DEFAULT_APP_VERSION = exports.functions = exports.types = exports.as = exports.utils = void 0;
|
|
29
|
+
exports.LAYER = exports.DEFAULT_SYSTEM_VERSION = exports.DEFAULT_SYSTEM_LANG_CODE = exports.DEFAULT_LANG_PACK = exports.DEFAULT_LANG_CODE = exports.DEFAULT_INITIAL_DC = exports.DEFAULT_DEVICE_MODEL = exports.DEFAULT_APP_VERSION = exports.functions = exports.types = exports.serialize = exports.as = exports.utils = void 0;
|
|
30
30
|
const _0_bigint_js_1 = require("./utilities/0_bigint.js");
|
|
31
31
|
const _0_password_js_1 = require("./client/0_password.js");
|
|
32
32
|
exports.utils = { checkPassword: _0_password_js_1.checkPassword, getRandomId: _0_bigint_js_1.getRandomId };
|
|
33
33
|
var _1_tl_object_js_1 = require("./tl/1_tl_object.js");
|
|
34
34
|
Object.defineProperty(exports, "as", { enumerable: true, get: function () { return _1_tl_object_js_1.as; } });
|
|
35
|
+
Object.defineProperty(exports, "serialize", { enumerable: true, get: function () { return _1_tl_object_js_1.serialize; } });
|
|
35
36
|
exports.types = __importStar(require("./tl/2_types.js"));
|
|
36
37
|
exports.functions = __importStar(require("./tl/3_functions.js"));
|
|
37
38
|
__exportStar(require("./tl/5_rpc_result.js"), exports);
|