@mtkruto/node 0.0.905 → 0.0.906
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/constants.d.ts +1 -1
- package/esm/constants.js +1 -1
- package/esm/types/1_chat.d.ts +1 -0
- package/esm/types/1_chat.js +21 -2
- package/package.json +1 -1
- package/script/constants.d.ts +1 -1
- package/script/constants.js +1 -1
- package/script/types/1_chat.d.ts +1 -0
- package/script/types/1_chat.js +21 -2
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.906";
|
|
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
|
@@ -62,7 +62,7 @@ export const publicKeys = new Map([
|
|
|
62
62
|
export const VECTOR_CONSTRUCTOR = 0x1CB5C415;
|
|
63
63
|
export const DEFAULT_INITIAL_DC = "2-test";
|
|
64
64
|
export const LAYER = 158;
|
|
65
|
-
export const DEFAULT_APP_VERSION = "MTKruto 0.0.
|
|
65
|
+
export const DEFAULT_APP_VERSION = "MTKruto 0.0.906";
|
|
66
66
|
// @ts-ignore: lib
|
|
67
67
|
export const DEFAULT_DEVICE_MODEL = typeof dntShim.Deno === "undefined" ? typeof navigator === "undefined" ? typeof process === "undefined" ? "Unknown" : process.platform + "-" + process.arch : navigator.userAgent.split(" ")[0] : dntShim.Deno.build.os + "-" + dntShim.Deno.build.arch;
|
|
68
68
|
export const DEFAULT_LANG_CODE = typeof navigator === "undefined" ? "en" : navigator.language.split("-")[0];
|
package/esm/types/1_chat.d.ts
CHANGED
package/esm/types/1_chat.js
CHANGED
|
@@ -55,11 +55,30 @@ export function constructChat(chat) {
|
|
|
55
55
|
const { title, scam: isScam = false, fake: isFake = false, verified: isVerified = false, restricted: isRestricted = false, } = chat;
|
|
56
56
|
const id = ZERO_CHANNEL_ID + -Number(chat.id);
|
|
57
57
|
if (chat.megagroup) {
|
|
58
|
-
chat_ = {
|
|
58
|
+
chat_ = {
|
|
59
|
+
id,
|
|
60
|
+
idColor: getIdColor(id),
|
|
61
|
+
type: ChatType.Supergroup,
|
|
62
|
+
title,
|
|
63
|
+
isScam,
|
|
64
|
+
isFake,
|
|
65
|
+
isVerified,
|
|
66
|
+
isRestricted,
|
|
67
|
+
isForum: chat.forum || false,
|
|
68
|
+
};
|
|
59
69
|
}
|
|
60
70
|
else {
|
|
61
71
|
const id = ZERO_CHANNEL_ID + -Number(chat.id);
|
|
62
|
-
chat_ = {
|
|
72
|
+
chat_ = {
|
|
73
|
+
id,
|
|
74
|
+
idColor: getIdColor(id),
|
|
75
|
+
type: ChatType.Channel,
|
|
76
|
+
title,
|
|
77
|
+
isScam,
|
|
78
|
+
isFake,
|
|
79
|
+
isVerified,
|
|
80
|
+
isRestricted,
|
|
81
|
+
};
|
|
63
82
|
}
|
|
64
83
|
chat_.username = chat.username;
|
|
65
84
|
chat_.also = chat.usernames?.map((v) => v[as](types.Username)).map((v) => v.username);
|
package/package.json
CHANGED
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.906";
|
|
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
|
@@ -88,7 +88,7 @@ exports.publicKeys = new Map([
|
|
|
88
88
|
exports.VECTOR_CONSTRUCTOR = 0x1CB5C415;
|
|
89
89
|
exports.DEFAULT_INITIAL_DC = "2-test";
|
|
90
90
|
exports.LAYER = 158;
|
|
91
|
-
exports.DEFAULT_APP_VERSION = "MTKruto 0.0.
|
|
91
|
+
exports.DEFAULT_APP_VERSION = "MTKruto 0.0.906";
|
|
92
92
|
// @ts-ignore: lib
|
|
93
93
|
exports.DEFAULT_DEVICE_MODEL = typeof dntShim.Deno === "undefined" ? typeof navigator === "undefined" ? typeof process === "undefined" ? "Unknown" : process.platform + "-" + process.arch : navigator.userAgent.split(" ")[0] : dntShim.Deno.build.os + "-" + dntShim.Deno.build.arch;
|
|
94
94
|
exports.DEFAULT_LANG_CODE = typeof navigator === "undefined" ? "en" : navigator.language.split("-")[0];
|
package/script/types/1_chat.d.ts
CHANGED
package/script/types/1_chat.js
CHANGED
|
@@ -81,11 +81,30 @@ function constructChat(chat) {
|
|
|
81
81
|
const { title, scam: isScam = false, fake: isFake = false, verified: isVerified = false, restricted: isRestricted = false, } = chat;
|
|
82
82
|
const id = constants_js_1.ZERO_CHANNEL_ID + -Number(chat.id);
|
|
83
83
|
if (chat.megagroup) {
|
|
84
|
-
chat_ = {
|
|
84
|
+
chat_ = {
|
|
85
|
+
id,
|
|
86
|
+
idColor: (0, _0_id_color_js_1.getIdColor)(id),
|
|
87
|
+
type: ChatType.Supergroup,
|
|
88
|
+
title,
|
|
89
|
+
isScam,
|
|
90
|
+
isFake,
|
|
91
|
+
isVerified,
|
|
92
|
+
isRestricted,
|
|
93
|
+
isForum: chat.forum || false,
|
|
94
|
+
};
|
|
85
95
|
}
|
|
86
96
|
else {
|
|
87
97
|
const id = constants_js_1.ZERO_CHANNEL_ID + -Number(chat.id);
|
|
88
|
-
chat_ = {
|
|
98
|
+
chat_ = {
|
|
99
|
+
id,
|
|
100
|
+
idColor: (0, _0_id_color_js_1.getIdColor)(id),
|
|
101
|
+
type: ChatType.Channel,
|
|
102
|
+
title,
|
|
103
|
+
isScam,
|
|
104
|
+
isFake,
|
|
105
|
+
isVerified,
|
|
106
|
+
isRestricted,
|
|
107
|
+
};
|
|
89
108
|
}
|
|
90
109
|
chat_.username = chat.username;
|
|
91
110
|
chat_.also = chat.usernames?.map((v) => v[_1_tl_object_js_1.as](types.Username)).map((v) => v.username);
|