@mtkruto/node 0.71.1 → 0.72.0
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/3_types.d.ts +3 -0
- package/esm/3_types.d.ts.map +1 -1
- package/esm/3_types.js +3 -0
- package/esm/client/0_params.d.ts +9 -1
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/0_storage_operations.js +1 -1
- package/esm/client/2_update_manager.d.ts.map +1 -1
- package/esm/client/2_update_manager.js +9 -2
- package/esm/client/3_message_manager.d.ts +2 -1
- package/esm/client/3_message_manager.d.ts.map +1 -1
- package/esm/client/3_message_manager.js +18 -1
- package/esm/client/5_client.d.ts +9 -2
- package/esm/client/5_client.d.ts.map +1 -1
- package/esm/client/5_client.js +19 -7
- package/esm/types/0_chat_administrator_rights.d.ts +8 -0
- package/esm/types/0_chat_administrator_rights.d.ts.map +1 -1
- package/esm/types/0_chat_administrator_rights.js +23 -1
- package/esm/types/0_gift_value.d.ts +25 -0
- package/esm/types/0_gift_value.d.ts.map +1 -0
- package/esm/types/0_gift_value.js +20 -0
- package/esm/types/1_chat_p.d.ts +1 -1
- package/esm/types/1_chat_p.d.ts.map +1 -1
- package/esm/types/2_message_reaction_list_item.d.ts +39 -0
- package/esm/types/2_message_reaction_list_item.d.ts.map +1 -0
- package/esm/types/2_message_reaction_list_item.js +50 -0
- package/esm/types/3_message_reaction_list.d.ts +32 -0
- package/esm/types/3_message_reaction_list.d.ts.map +1 -0
- package/esm/types/3_message_reaction_list.js +31 -0
- package/esm/types/4_gift.d.ts +7 -0
- package/esm/types/4_gift.d.ts.map +1 -1
- package/esm/types/4_gift.js +9 -1
- package/esm/types/5_claimed_gift.d.ts +1 -1
- package/esm/types/5_claimed_gift.d.ts.map +1 -1
- package/esm/types/5_claimed_gift.js +0 -5
- package/esm/types/6_claimed_gifts.js +1 -1
- package/esm/types/7_chat_list_item.js +1 -1
- package/esm/types/7_saved_chat.d.ts +1 -1
- package/esm/types/7_saved_chat.d.ts.map +1 -1
- package/esm/types/7_saved_chat.js +1 -2
- package/package.json +1 -1
- package/script/3_types.d.ts +3 -0
- package/script/3_types.d.ts.map +1 -1
- package/script/3_types.js +3 -0
- package/script/client/0_params.d.ts +9 -1
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/0_storage_operations.js +1 -1
- package/script/client/2_update_manager.d.ts.map +1 -1
- package/script/client/2_update_manager.js +9 -2
- package/script/client/3_message_manager.d.ts +2 -1
- package/script/client/3_message_manager.d.ts.map +1 -1
- package/script/client/3_message_manager.js +17 -0
- package/script/client/5_client.d.ts +9 -2
- package/script/client/5_client.d.ts.map +1 -1
- package/script/client/5_client.js +19 -7
- package/script/types/0_chat_administrator_rights.d.ts +8 -0
- package/script/types/0_chat_administrator_rights.d.ts.map +1 -1
- package/script/types/0_chat_administrator_rights.js +23 -1
- package/script/types/0_gift_value.d.ts +25 -0
- package/script/types/0_gift_value.d.ts.map +1 -0
- package/script/types/0_gift_value.js +21 -0
- package/script/types/1_chat_p.d.ts +1 -1
- package/script/types/1_chat_p.d.ts.map +1 -1
- package/script/types/2_message_reaction_list_item.d.ts +39 -0
- package/script/types/2_message_reaction_list_item.d.ts.map +1 -0
- package/script/types/2_message_reaction_list_item.js +53 -0
- package/script/types/3_message_reaction_list.d.ts +32 -0
- package/script/types/3_message_reaction_list.d.ts.map +1 -0
- package/script/types/3_message_reaction_list.js +34 -0
- package/script/types/4_gift.d.ts +7 -0
- package/script/types/4_gift.d.ts.map +1 -1
- package/script/types/4_gift.js +9 -1
- package/script/types/5_claimed_gift.d.ts +1 -1
- package/script/types/5_claimed_gift.d.ts.map +1 -1
- package/script/types/5_claimed_gift.js +0 -5
- package/script/types/6_claimed_gifts.js +1 -1
- package/script/types/7_chat_list_item.js +1 -1
- package/script/types/7_saved_chat.d.ts +1 -1
- package/script/types/7_saved_chat.d.ts.map +1 -1
- package/script/types/7_saved_chat.js +1 -2
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
4
|
+
* Copyright (C) 2023-2025 Roj <https://roj.im/>
|
|
5
|
+
*
|
|
6
|
+
* This file is part of MTKruto.
|
|
7
|
+
*
|
|
8
|
+
* This program is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU Lesser General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
19
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.constructMessageReactionList = constructMessageReactionList;
|
|
23
|
+
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
24
|
+
const _2_message_reaction_list_item_js_1 = require("./2_message_reaction_list_item.js");
|
|
25
|
+
function constructMessageReactionList(messageReactionsList) {
|
|
26
|
+
const reactions = messageReactionsList.reactions.map((v) => (0, _2_message_reaction_list_item_js_1.constructMessageReactionListItem)(v, messageReactionsList));
|
|
27
|
+
const count = messageReactionsList.count;
|
|
28
|
+
const nextOffset = messageReactionsList.next_offset;
|
|
29
|
+
return (0, _1_utilities_js_1.cleanObject)({
|
|
30
|
+
reactions,
|
|
31
|
+
count,
|
|
32
|
+
nextOffset,
|
|
33
|
+
});
|
|
34
|
+
}
|
package/script/types/4_gift.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ import type { PeerGetter } from "./1_chat_p.js";
|
|
|
22
22
|
import { type Sticker } from "./1_sticker.js";
|
|
23
23
|
import { type User } from "./2_user.js";
|
|
24
24
|
import { type GiftUpgradedComponent } from "./3_gift_upgraded_component.js";
|
|
25
|
+
import type { GiftValue } from "./0_gift_value.js";
|
|
25
26
|
/**
|
|
26
27
|
* An non-upgraded gift.
|
|
27
28
|
*
|
|
@@ -85,6 +86,12 @@ export interface GiftUpgraded {
|
|
|
85
86
|
address?: string;
|
|
86
87
|
/** The amount of stars that can be used to buy the gift. */
|
|
87
88
|
price?: number;
|
|
89
|
+
/** The amount of TON that can be used to buy the gift. */
|
|
90
|
+
priceTon?: number;
|
|
91
|
+
/** Whether the gift can be bought only using TON. */
|
|
92
|
+
tonOnly?: boolean;
|
|
93
|
+
/** The value of the gift. */
|
|
94
|
+
value?: GiftValue;
|
|
88
95
|
}
|
|
89
96
|
/** A gift. */
|
|
90
97
|
export type Gift = GiftNonUpgraded | GiftUpgraded;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4_gift.d.ts","sourceRoot":"","sources":["../../src/types/4_gift.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAqB,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAiB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAkC,KAAK,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"4_gift.d.ts","sourceRoot":"","sources":["../../src/types/4_gift.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAqB,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAiB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAkC,KAAK,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5G,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,qBAAqB;IACrB,IAAI,EAAE,aAAa,CAAC;IACpB,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,4CAA4C;IAC5C,OAAO,EAAE,OAAO,CAAC;IACjB,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,OAAO,EAAE,OAAO,CAAC;IACjB,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kDAAkD;IAClD,QAAQ,EAAE,OAAO,CAAC;IAClB,sEAAsE;IACtE,eAAe,EAAE,MAAM,CAAC;IACxB,0DAA0D;IAC1D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,qBAAqB;IACrB,IAAI,EAAE,UAAU,CAAC;IACjB,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mCAAmC;IACnC,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,kEAAkE;IAClE,eAAe,EAAE,MAAM,CAAC;IACxB,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,UAAU,EAAE,qBAAqB,EAAE,CAAC;IACpC,iDAAiD;IACjD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,cAAc;AACd,MAAM,MAAM,IAAI,GAAG,eAAe,GAAG,YAAY,CAAC;AAElD,wBAAgB,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,GAAG,IAAI,CAM3E;AACD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,GAAG,CAAC,cAAc,EAAE,OAAO,EAAE,UAAU,GAAG,YAAY,CA0CjG;AACD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,GAAG,CAAC,QAAQ,GAAG,IAAI,CAqCjE"}
|
package/script/types/4_gift.js
CHANGED
|
@@ -48,13 +48,18 @@ function constructGiftUpgraded(gift, getPeer) {
|
|
|
48
48
|
owner = (0, _2_user_js_1.constructUser)(entity);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
+
const starsAmount_ = gift.resell_amount?.find((v) => v._ === "starsAmount");
|
|
52
|
+
const starsTonAmount_ = gift.resell_amount?.find((v) => v._ === "starsTonAmount");
|
|
51
53
|
const ownerName = gift.owner_name;
|
|
52
54
|
const ownerAddress = gift.owner_address;
|
|
53
55
|
const currentUpgrades = gift.availability_issued;
|
|
54
56
|
const maxUpgrades = gift.availability_total;
|
|
55
57
|
const components = gift.attributes.map(_3_gift_upgraded_component_js_1.constructGiftUpgradedComponent);
|
|
56
58
|
const address = gift.gift_address;
|
|
57
|
-
const price =
|
|
59
|
+
const price = starsAmount_ ? Number(starsAmount_.amount) : undefined;
|
|
60
|
+
const priceTon = starsTonAmount_ ? Number(starsTonAmount_.amount / 10000000n) / 100 : undefined;
|
|
61
|
+
const tonOnly = (price || priceTon) ? !!gift.resale_ton_only : undefined;
|
|
62
|
+
const value = gift.value_amount ? { amount: Number(gift.value_amount), currency: gift.value_currency ?? "" } : undefined;
|
|
58
63
|
return (0, _1_utilities_js_1.cleanObject)({
|
|
59
64
|
type: "upgraded",
|
|
60
65
|
id,
|
|
@@ -68,6 +73,9 @@ function constructGiftUpgraded(gift, getPeer) {
|
|
|
68
73
|
components,
|
|
69
74
|
address,
|
|
70
75
|
price,
|
|
76
|
+
priceTon,
|
|
77
|
+
tonOnly,
|
|
78
|
+
value,
|
|
71
79
|
});
|
|
72
80
|
}
|
|
73
81
|
function constructGiftNonUpgraded(gift) {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* You should have received a copy of the GNU Lesser General Public License
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
|
-
import { Api } from "../2_tl.js";
|
|
20
|
+
import type { Api } from "../2_tl.js";
|
|
21
21
|
import { type ChatP, type PeerGetter } from "./1_chat_p.js";
|
|
22
22
|
import { type MessageEntity } from "./2_message_entity.js";
|
|
23
23
|
import { type Gift } from "./4_gift.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"5_claimed_gift.d.ts","sourceRoot":"","sources":["../../src/types/5_claimed_gift.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;
|
|
1
|
+
{"version":3,"file":"5_claimed_gift.d.ts","sourceRoot":"","sources":["../../src/types/5_claimed_gift.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,KAAK,EAAkB,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,EAAiB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAEvD,6CAA6C;AAC7C,MAAM,WAAW,WAAW;IAC1B,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB;IAChB,IAAI,EAAE,IAAI,CAAC;IACX,4CAA4C;IAC5C,MAAM,EAAE,OAAO,CAAC;IAChB,8BAA8B;IAC9B,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;IAC3B,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,oBAAoB,CAAC,aAAa,EAAE,GAAG,CAAC,aAAa,EAAE,QAAQ,EAAE,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,SAAS,EAAE,OAAO,EAAE,UAAU,GAAG,WAAW,CAmBlJ"}
|
|
@@ -20,16 +20,11 @@
|
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.constructClaimedGift = constructClaimedGift;
|
|
23
|
-
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
23
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
25
|
-
const _2_tl_js_1 = require("../2_tl.js");
|
|
26
24
|
const _1_chat_p_js_1 = require("./1_chat_p.js");
|
|
27
25
|
const _2_message_entity_js_1 = require("./2_message_entity.js");
|
|
28
26
|
const _4_gift_js_1 = require("./4_gift.js");
|
|
29
27
|
function constructClaimedGift(savedStarGift, fromPeer, getPeer) {
|
|
30
|
-
if (fromPeer && !_2_tl_js_1.Api.isOneOf(["user", "chat", "channel"], fromPeer)) {
|
|
31
|
-
(0, _0_deps_js_1.unreachable)();
|
|
32
|
-
}
|
|
33
28
|
const gift = (0, _4_gift_js_1.constructGift)(savedStarGift.gift, getPeer);
|
|
34
29
|
const date = savedStarGift.date;
|
|
35
30
|
const public_ = !!savedStarGift.unsaved;
|
|
@@ -36,7 +36,7 @@ function constructClaimedGifts(savedStarGifts, getPeer) {
|
|
|
36
36
|
return [v, savedStarGifts.chats.find((u) => _2_tl_js_1.Api.is("chat", u) && u.id === fromId.chat_id)];
|
|
37
37
|
}
|
|
38
38
|
else if (fromId) {
|
|
39
|
-
return [v, savedStarGifts.chats.find((u) => _2_tl_js_1.Api.
|
|
39
|
+
return [v, savedStarGifts.chats.find((u) => _2_tl_js_1.Api.isOneOf(["channel", "channelForbidden"], u) && u.id === fromId.channel_id)];
|
|
40
40
|
}
|
|
41
41
|
else {
|
|
42
42
|
return [v, undefined];
|
|
@@ -81,7 +81,7 @@ async function constructChatListItem4(dialog, dialogs, pinnedChats, getPeer, get
|
|
|
81
81
|
const userId = "user_id" in dialog.peer ? dialog.peer.user_id : null;
|
|
82
82
|
const chatId = "chat_id" in dialog.peer ? dialog.peer.chat_id : null;
|
|
83
83
|
const channelId = "channel_id" in dialog.peer ? dialog.peer.channel_id : null;
|
|
84
|
-
const chat__ = chatId !== null ? dialogs.chats.find((v) => _2_tl_js_1.Api.is("chat", v) && v.id === chatId) : channelId !== null ? dialogs.chats.find((v) => _2_tl_js_1.Api.
|
|
84
|
+
const chat__ = chatId !== null ? dialogs.chats.find((v) => _2_tl_js_1.Api.is("chat", v) && v.id === chatId) : channelId !== null ? dialogs.chats.find((v) => _2_tl_js_1.Api.isOneOf(["channel", "channelForbidden"], v) && v.id === channelId) : userId !== null ? dialogs.users.find((v) => _2_tl_js_1.Api.is("user", v) && v.id === userId) : (0, _0_deps_js_1.unreachable)();
|
|
85
85
|
if (!chat__) {
|
|
86
86
|
(0, _0_deps_js_1.unreachable)();
|
|
87
87
|
}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* You should have received a copy of the GNU Lesser General Public License
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
|
-
import { Api } from "../2_tl.js";
|
|
20
|
+
import type { Api } from "../2_tl.js";
|
|
21
21
|
import type { SavedDialog } from "../tl/1_telegram_api.js";
|
|
22
22
|
import { type ChatP, type PeerGetter } from "./1_chat_p.js";
|
|
23
23
|
import type { StickerSetNameGetter } from "./1_sticker.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"7_saved_chat.d.ts","sourceRoot":"","sources":["../../src/types/7_saved_chat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"7_saved_chat.d.ts","sourceRoot":"","sources":["../../src/types/7_saved_chat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,EAAE,KAAK,KAAK,EAAkB,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAoB,KAAK,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpF,mCAAmC;AACnC,MAAM,WAAW,SAAS;IACxB,gBAAgB;IAChB,IAAI,EAAE,KAAK,CAAC;IACZ,qCAAqC;IACrC,WAAW,EAAE,OAAO,CAAC;IACrB,kCAAkC;IAClC,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,CAAC,qBAAqB,GAAG,GAAG,CAAC,0BAA0B,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,oBAAoB,GAAG,OAAO,CAAC,SAAS,CAAC,CAkB7O"}
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.constructSavedChat = constructSavedChat;
|
|
23
|
-
const _2_tl_js_1 = require("../2_tl.js");
|
|
24
23
|
const _2_telegram_js_1 = require("../tl/2_telegram.js");
|
|
25
24
|
const _1_chat_p_js_1 = require("./1_chat_p.js");
|
|
26
25
|
const _6_message_js_1 = require("./6_message.js");
|
|
@@ -32,7 +31,7 @@ async function constructSavedChat(dialog, result, getPeer, getMessage, getSticke
|
|
|
32
31
|
}
|
|
33
32
|
const dialogId = (0, _2_telegram_js_1.peerToChatId)(dialog.peer);
|
|
34
33
|
const chat_ = (dialog.peer._ === "peerUser" ? result.users : result.chats).find((v) => (0, _2_telegram_js_1.peerToChatId)(v) === dialogId);
|
|
35
|
-
if (chat_ === undefined
|
|
34
|
+
if (chat_ === undefined) {
|
|
36
35
|
(0, unreachable_js_1.unreachable)();
|
|
37
36
|
}
|
|
38
37
|
const chat = (0, _1_chat_p_js_1.constructChatP)(chat_);
|