@mtcute/core 0.19.1 → 0.19.2

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.
@@ -158,7 +158,9 @@ class Dialog {
158
158
  get lastMessage() {
159
159
  const cid = this.peer.id;
160
160
  if (this._messages.has(cid)) {
161
- return new message.Message(this._messages.get(cid), this._peers);
161
+ const msg = this._messages.get(cid);
162
+ if (msg._ === "messageEmpty") return null;
163
+ return new message.Message(msg, this._peers);
162
164
  }
163
165
  return null;
164
166
  }
@@ -151,7 +151,9 @@ class Dialog {
151
151
  get lastMessage() {
152
152
  const cid = this.peer.id;
153
153
  if (this._messages.has(cid)) {
154
- return new Message$2(this._messages.get(cid), this._peers);
154
+ const msg = this._messages.get(cid);
155
+ if (msg._ === "messageEmpty") return null;
156
+ return new Message$2(msg, this._peers);
155
157
  }
156
158
  return null;
157
159
  }
@@ -30,7 +30,7 @@ class StarGift {
30
30
  return this.raw.limited;
31
31
  }
32
32
  /** Whether this gift is a unique gift */
33
- isUnique = true;
33
+ isUnique = false;
34
34
  /** Additional information for sold-out gifts */
35
35
  get soldOutInfo() {
36
36
  if (this.raw.firstSaleDate == null || this.raw.lastSaleDate == null) {
@@ -17,7 +17,7 @@ export declare class StarGift {
17
17
  /** Whether this gift has limited availability */
18
18
  get isLimited(): boolean;
19
19
  /** Whether this gift is a unique gift */
20
- readonly isUnique: true;
20
+ readonly isUnique: false;
21
21
  /** Additional information for sold-out gifts */
22
22
  get soldOutInfo(): {
23
23
  /** Date when the first gift was bought */
@@ -17,7 +17,7 @@ export declare class StarGift {
17
17
  /** Whether this gift has limited availability */
18
18
  get isLimited(): boolean;
19
19
  /** Whether this gift is a unique gift */
20
- readonly isUnique: true;
20
+ readonly isUnique: false;
21
21
  /** Additional information for sold-out gifts */
22
22
  get soldOutInfo(): {
23
23
  /** Date when the first gift was bought */
@@ -23,7 +23,7 @@ class StarGift {
23
23
  return this.raw.limited;
24
24
  }
25
25
  /** Whether this gift is a unique gift */
26
- isUnique = true;
26
+ isUnique = false;
27
27
  /** Additional information for sold-out gifts */
28
28
  get soldOutInfo() {
29
29
  if (this.raw.firstSaleDate == null || this.raw.lastSaleDate == null) {
@@ -220,7 +220,7 @@ class NetworkManager {
220
220
  _: "initConnection",
221
221
  deviceModel,
222
222
  systemVersion: "1.0",
223
- appVersion: "0.19.1",
223
+ appVersion: "0.19.2",
224
224
  systemLangCode: "en",
225
225
  langPack: "",
226
226
  // "langPacks are for official apps only"
@@ -213,7 +213,7 @@ class NetworkManager {
213
213
  _: "initConnection",
214
214
  deviceModel,
215
215
  systemVersion: "1.0",
216
- appVersion: "0.19.1",
216
+ appVersion: "0.19.2",
217
217
  systemLangCode: "en",
218
218
  langPack: "",
219
219
  // "langPacks are for official apps only"
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@mtcute/core",
3
3
  "type": "module",
4
- "version": "0.19.1",
4
+ "version": "0.19.2",
5
5
  "description": "Type-safe library for MTProto (Telegram API)",
6
6
  "license": "MIT",
7
7
  "scripts": {},
8
8
  "dependencies": {
9
- "@fuman/io": "0.0.4",
10
- "@fuman/net": "0.0.4",
9
+ "@fuman/io": "0.0.8",
10
+ "@fuman/net": "0.0.8",
11
11
  "@fuman/utils": "0.0.4",
12
12
  "@mtcute/file-id": "^0.19.0",
13
13
  "@mtcute/tl": "^196.0.0",