@mtkruto/node 0.1.148 → 0.1.149

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.
@@ -4,7 +4,7 @@ export type PublicKeys = readonly [bigint, [bigint, bigint]][];
4
4
  export declare const PUBLIC_KEYS: PublicKeys;
5
5
  export declare const INITIAL_DC: DC;
6
6
  export declare const LAYER = 172;
7
- export declare const APP_VERSION = "MTKruto 0.1.148";
7
+ export declare const APP_VERSION = "MTKruto 0.1.149";
8
8
  export declare const DEVICE_MODEL: string;
9
9
  export declare const LANG_CODE: string;
10
10
  export declare const LANG_PACK = "";
@@ -53,7 +53,7 @@ export const PUBLIC_KEYS = Object.freeze([
53
53
  ]);
54
54
  export const INITIAL_DC = "2";
55
55
  export const LAYER = 172;
56
- export const APP_VERSION = "MTKruto 0.1.148";
56
+ export const APP_VERSION = "MTKruto 0.1.149";
57
57
  // @ts-ignore: lib
58
58
  export const 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;
59
59
  export const LANG_CODE = typeof navigator === "undefined" ? "en" : navigator.language.split("-")[0];
@@ -1227,11 +1227,11 @@ export class Client extends ClientAbstract {
1227
1227
  }
1228
1228
  const resolvedIdType = getChatIdPeerType(resolvedId);
1229
1229
  if (resolvedIdType == "user") {
1230
- const accessHash = await this.storage.getUserAccessHash(resolvedId);
1230
+ const accessHash = await this.messageStorage.getUserAccessHash(resolvedId);
1231
1231
  return new types.InputPeerUser({ user_id: chatIdToPeerId(resolvedId), access_hash: accessHash ?? 0n });
1232
1232
  }
1233
1233
  else if (resolvedIdType == "channel") {
1234
- const accessHash = await this.storage.getChannelAccessHash(resolvedId);
1234
+ const accessHash = await this.messageStorage.getChannelAccessHash(resolvedId);
1235
1235
  return new types.InputPeerChannel({ channel_id: chatIdToPeerId(resolvedId), access_hash: accessHash ?? 0n });
1236
1236
  }
1237
1237
  else {
@@ -1239,14 +1239,14 @@ export class Client extends ClientAbstract {
1239
1239
  }
1240
1240
  }
1241
1241
  else if (id > 0) {
1242
- const accessHash = await this.storage.getUserAccessHash(id);
1242
+ const accessHash = await this.messageStorage.getUserAccessHash(id);
1243
1243
  return new types.InputPeerUser({ user_id: chatIdToPeerId(id), access_hash: accessHash ?? 0n });
1244
1244
  }
1245
1245
  else if (-MAX_CHAT_ID <= id) {
1246
1246
  return new types.InputPeerChat({ chat_id: BigInt(Math.abs(id)) });
1247
1247
  }
1248
1248
  else if (ZERO_CHANNEL_ID - MAX_CHANNEL_ID <= id && id != ZERO_CHANNEL_ID) {
1249
- const accessHash = await this.storage.getChannelAccessHash(id);
1249
+ const accessHash = await this.messageStorage.getChannelAccessHash(id);
1250
1250
  return new types.InputPeerChannel({ channel_id: chatIdToPeerId(id), access_hash: accessHash ?? 0n });
1251
1251
  }
1252
1252
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mtkruto/node",
3
- "version": "0.1.148",
3
+ "version": "0.1.149",
4
4
  "description": "MTKruto for Node.js",
5
5
  "author": "Roj <rojvv@icloud.com>",
6
6
  "repository": {
@@ -4,7 +4,7 @@ export type PublicKeys = readonly [bigint, [bigint, bigint]][];
4
4
  export declare const PUBLIC_KEYS: PublicKeys;
5
5
  export declare const INITIAL_DC: DC;
6
6
  export declare const LAYER = 172;
7
- export declare const APP_VERSION = "MTKruto 0.1.148";
7
+ export declare const APP_VERSION = "MTKruto 0.1.149";
8
8
  export declare const DEVICE_MODEL: string;
9
9
  export declare const LANG_CODE: string;
10
10
  export declare const LANG_PACK = "";
@@ -79,7 +79,7 @@ exports.PUBLIC_KEYS = Object.freeze([
79
79
  ]);
80
80
  exports.INITIAL_DC = "2";
81
81
  exports.LAYER = 172;
82
- exports.APP_VERSION = "MTKruto 0.1.148";
82
+ exports.APP_VERSION = "MTKruto 0.1.149";
83
83
  // @ts-ignore: lib
84
84
  exports.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;
85
85
  exports.LANG_CODE = typeof navigator === "undefined" ? "en" : navigator.language.split("-")[0];
@@ -1231,11 +1231,11 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
1231
1231
  }
1232
1232
  const resolvedIdType = (0, _2_tl_js_1.getChatIdPeerType)(resolvedId);
1233
1233
  if (resolvedIdType == "user") {
1234
- const accessHash = await this.storage.getUserAccessHash(resolvedId);
1234
+ const accessHash = await this.messageStorage.getUserAccessHash(resolvedId);
1235
1235
  return new _2_tl_js_1.types.InputPeerUser({ user_id: (0, _2_tl_js_1.chatIdToPeerId)(resolvedId), access_hash: accessHash ?? 0n });
1236
1236
  }
1237
1237
  else if (resolvedIdType == "channel") {
1238
- const accessHash = await this.storage.getChannelAccessHash(resolvedId);
1238
+ const accessHash = await this.messageStorage.getChannelAccessHash(resolvedId);
1239
1239
  return new _2_tl_js_1.types.InputPeerChannel({ channel_id: (0, _2_tl_js_1.chatIdToPeerId)(resolvedId), access_hash: accessHash ?? 0n });
1240
1240
  }
1241
1241
  else {
@@ -1243,14 +1243,14 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
1243
1243
  }
1244
1244
  }
1245
1245
  else if (id > 0) {
1246
- const accessHash = await this.storage.getUserAccessHash(id);
1246
+ const accessHash = await this.messageStorage.getUserAccessHash(id);
1247
1247
  return new _2_tl_js_1.types.InputPeerUser({ user_id: (0, _2_tl_js_1.chatIdToPeerId)(id), access_hash: accessHash ?? 0n });
1248
1248
  }
1249
1249
  else if (-_4_constants_js_1.MAX_CHAT_ID <= id) {
1250
1250
  return new _2_tl_js_1.types.InputPeerChat({ chat_id: BigInt(Math.abs(id)) });
1251
1251
  }
1252
1252
  else if (_1_utilities_js_1.ZERO_CHANNEL_ID - _4_constants_js_1.MAX_CHANNEL_ID <= id && id != _1_utilities_js_1.ZERO_CHANNEL_ID) {
1253
- const accessHash = await this.storage.getChannelAccessHash(id);
1253
+ const accessHash = await this.messageStorage.getChannelAccessHash(id);
1254
1254
  return new _2_tl_js_1.types.InputPeerChannel({ channel_id: (0, _2_tl_js_1.chatIdToPeerId)(id), access_hash: accessHash ?? 0n });
1255
1255
  }
1256
1256
  else {