@mtkruto/node 0.0.982 → 0.0.983

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.
@@ -5,7 +5,7 @@ export declare const PUBLIC_KEYS: PublicKeys;
5
5
  export declare const VECTOR_CONSTRUCTOR = 481674261;
6
6
  export declare const INITIAL_DC: DC;
7
7
  export declare const LAYER = 161;
8
- export declare const APP_VERSION = "MTKruto 0.0.982";
8
+ export declare const APP_VERSION = "MTKruto 0.0.983";
9
9
  export declare const DEVICE_MODEL: string;
10
10
  export declare const LANG_CODE: string;
11
11
  export declare const LANG_PACK = "";
package/esm/constants.js CHANGED
@@ -54,7 +54,7 @@ export const PUBLIC_KEYS = Object.freeze([
54
54
  export const VECTOR_CONSTRUCTOR = 0x1CB5C415;
55
55
  export const INITIAL_DC = "2-test";
56
56
  export const LAYER = 161;
57
- export const APP_VERSION = "MTKruto 0.0.982";
57
+ export const APP_VERSION = "MTKruto 0.0.983";
58
58
  // @ts-ignore: lib
59
59
  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;
60
60
  export const LANG_CODE = typeof navigator === "undefined" ? "en" : navigator.language.split("-")[0];
@@ -22,6 +22,8 @@ import { Venue } from "./0_venue.js";
22
22
  import { Location } from "./0_location.js";
23
23
  /** This object represents a message. */
24
24
  export interface Message {
25
+ /** Whether the message is outgoing */
26
+ out: boolean;
25
27
  /** Unique message identifier inside this chat */
26
28
  id: number;
27
29
  /** Unique identifier of a message thread to which the message belongs; for supergroups only */
@@ -64,6 +64,7 @@ async function getReply(message_, chat, getMessage) {
64
64
  }
65
65
  async function constructServiceMessage(message_, chat, getEntity, getMessage) {
66
66
  const message = {
67
+ out: message_.out ?? false,
67
68
  id: message_.id,
68
69
  chat: chat,
69
70
  date: new Date(message_.date * 1000),
@@ -218,6 +219,7 @@ export async function constructMessage(message_, getEntity, getMessage, getStick
218
219
  return await constructServiceMessage(message_, chat_, getEntity, getMessage);
219
220
  }
220
221
  const message = {
222
+ out: message_.out ?? false,
221
223
  id: message_.id,
222
224
  chat: chat_,
223
225
  date: new Date(message_.date * 1000),
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "module": "./esm/mod.js",
3
3
  "main": "./script/mod.js",
4
4
  "name": "@mtkruto/node",
5
- "version": "0.0.982",
5
+ "version": "0.0.983",
6
6
  "description": "MTKruto for Node.js",
7
7
  "author": "Roj <rojvv@icloud.com>",
8
8
  "license": "LGPL-3.0-or-later",
@@ -5,7 +5,7 @@ export declare const PUBLIC_KEYS: PublicKeys;
5
5
  export declare const VECTOR_CONSTRUCTOR = 481674261;
6
6
  export declare const INITIAL_DC: DC;
7
7
  export declare const LAYER = 161;
8
- export declare const APP_VERSION = "MTKruto 0.0.982";
8
+ export declare const APP_VERSION = "MTKruto 0.0.983";
9
9
  export declare const DEVICE_MODEL: string;
10
10
  export declare const LANG_CODE: string;
11
11
  export declare const LANG_PACK = "";
@@ -80,7 +80,7 @@ exports.PUBLIC_KEYS = Object.freeze([
80
80
  exports.VECTOR_CONSTRUCTOR = 0x1CB5C415;
81
81
  exports.INITIAL_DC = "2-test";
82
82
  exports.LAYER = 161;
83
- exports.APP_VERSION = "MTKruto 0.0.982";
83
+ exports.APP_VERSION = "MTKruto 0.0.983";
84
84
  // @ts-ignore: lib
85
85
  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;
86
86
  exports.LANG_CODE = typeof navigator === "undefined" ? "en" : navigator.language.split("-")[0];
@@ -22,6 +22,8 @@ import { Venue } from "./0_venue.js";
22
22
  import { Location } from "./0_location.js";
23
23
  /** This object represents a message. */
24
24
  export interface Message {
25
+ /** Whether the message is outgoing */
26
+ out: boolean;
25
27
  /** Unique message identifier inside this chat */
26
28
  id: number;
27
29
  /** Unique identifier of a message thread to which the message belongs; for supergroups only */
@@ -90,6 +90,7 @@ async function getReply(message_, chat, getMessage) {
90
90
  }
91
91
  async function constructServiceMessage(message_, chat, getEntity, getMessage) {
92
92
  const message = {
93
+ out: message_.out ?? false,
93
94
  id: message_.id,
94
95
  chat: chat,
95
96
  date: new Date(message_.date * 1000),
@@ -244,6 +245,7 @@ async function constructMessage(message_, getEntity, getMessage, getStickerSetNa
244
245
  return await constructServiceMessage(message_, chat_, getEntity, getMessage);
245
246
  }
246
247
  const message = {
248
+ out: message_.out ?? false,
247
249
  id: message_.id,
248
250
  chat: chat_,
249
251
  date: new Date(message_.date * 1000),