@mtkruto/node 0.192.0 → 0.193.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/README.md +5 -5
- package/esm/3_types.d.ts +6 -2
- package/esm/3_types.d.ts.map +1 -1
- package/esm/3_types.js +6 -2
- package/esm/client/0_html.d.ts +2 -1
- package/esm/client/0_html.d.ts.map +1 -1
- package/esm/client/0_html.js +18 -16
- package/esm/client/0_markdown.d.ts +3 -2
- package/esm/client/0_markdown.d.ts.map +1 -1
- package/esm/client/0_markdown.js +6 -4
- package/esm/client/0_params.d.ts +44 -0
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/1_client_generic.d.ts +122 -11
- package/esm/client/1_client_generic.d.ts.map +1 -1
- package/esm/client/3_account_manager.d.ts +5 -1
- package/esm/client/3_account_manager.d.ts.map +1 -1
- package/esm/client/3_account_manager.js +40 -2
- package/esm/client/3_message_manager.js +1 -1
- package/esm/client/3_secret_chat_manager.d.ts +7 -2
- package/esm/client/3_secret_chat_manager.d.ts.map +1 -1
- package/esm/client/3_secret_chat_manager.js +65 -16
- package/esm/client/3_sticker_set_manager.d.ts +5 -0
- package/esm/client/3_sticker_set_manager.d.ts.map +1 -1
- package/esm/client/3_sticker_set_manager.js +40 -9
- package/esm/client/4_chat_manager.d.ts +5 -1
- package/esm/client/4_chat_manager.d.ts.map +1 -1
- package/esm/client/4_chat_manager.js +59 -1
- package/esm/client/4_checklist_manager.js +1 -1
- package/esm/client/4_context.d.ts +10 -2
- package/esm/client/4_context.d.ts.map +1 -1
- package/esm/client/4_context.js +23 -0
- package/esm/client/4_forum_manager.d.ts +1 -0
- package/esm/client/4_forum_manager.d.ts.map +1 -1
- package/esm/client/4_forum_manager.js +5 -0
- package/esm/client/6_client.d.ts +120 -9
- package/esm/client/6_client.d.ts.map +1 -1
- package/esm/client/6_client.js +150 -7
- package/esm/client/6_client_dispatcher.d.ts +120 -9
- package/esm/client/6_client_dispatcher.d.ts.map +1 -1
- package/esm/client/6_client_dispatcher.js +150 -7
- package/esm/types/1_available_reactions.d.ts +3 -2
- package/esm/types/1_available_reactions.d.ts.map +1 -1
- package/esm/types/1_available_reactions.js +18 -1
- package/esm/types/1_channel_location.d.ts +8 -0
- package/esm/types/1_channel_location.d.ts.map +1 -0
- package/esm/types/1_channel_location.js +11 -0
- package/esm/types/1_sticker_set_p.d.ts +48 -0
- package/esm/types/1_sticker_set_p.d.ts.map +1 -0
- package/esm/types/1_sticker_set_p.js +73 -0
- package/esm/types/2_poll_voter.d.ts +19 -0
- package/esm/types/2_poll_voter.d.ts.map +1 -1
- package/esm/types/2_poll_voter.js +19 -0
- package/esm/types/3_rich_text_component.d.ts +24 -0
- package/esm/types/3_rich_text_component.d.ts.map +1 -1
- package/esm/types/4_page_block.d.ts +45 -1
- package/esm/types/4_page_block.d.ts.map +1 -1
- package/esm/types/B_recent_action.d.ts +225 -0
- package/esm/types/B_recent_action.d.ts.map +1 -0
- package/esm/types/B_recent_action.js +303 -0
- package/esm/types/B_topic_list_item.d.ts +22 -0
- package/esm/types/B_topic_list_item.d.ts.map +1 -1
- package/esm/types/B_topic_list_item.js +19 -0
- package/esm/types/C_recent_actions_entry.d.ts +13 -0
- package/esm/types/C_recent_actions_entry.d.ts.map +1 -0
- package/esm/types/C_recent_actions_entry.js +13 -0
- package/esm/types/C_topic_list.d.ts +20 -0
- package/esm/types/C_topic_list.d.ts.map +1 -1
- package/esm/types/C_topic_list.js +19 -0
- package/package.json +1 -1
- package/script/3_types.d.ts +6 -2
- package/script/3_types.d.ts.map +1 -1
- package/script/3_types.js +6 -2
- package/script/client/0_html.d.ts +2 -1
- package/script/client/0_html.d.ts.map +1 -1
- package/script/client/0_html.js +17 -15
- package/script/client/0_markdown.d.ts +3 -2
- package/script/client/0_markdown.d.ts.map +1 -1
- package/script/client/0_markdown.js +5 -3
- package/script/client/0_params.d.ts +44 -0
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/1_client_generic.d.ts +122 -11
- package/script/client/1_client_generic.d.ts.map +1 -1
- package/script/client/3_account_manager.d.ts +5 -1
- package/script/client/3_account_manager.d.ts.map +1 -1
- package/script/client/3_account_manager.js +40 -2
- package/script/client/3_message_manager.js +1 -1
- package/script/client/3_secret_chat_manager.d.ts +7 -2
- package/script/client/3_secret_chat_manager.d.ts.map +1 -1
- package/script/client/3_secret_chat_manager.js +65 -16
- package/script/client/3_sticker_set_manager.d.ts +5 -0
- package/script/client/3_sticker_set_manager.d.ts.map +1 -1
- package/script/client/3_sticker_set_manager.js +39 -8
- package/script/client/4_chat_manager.d.ts +5 -1
- package/script/client/4_chat_manager.d.ts.map +1 -1
- package/script/client/4_chat_manager.js +58 -0
- package/script/client/4_checklist_manager.js +1 -1
- package/script/client/4_context.d.ts +10 -2
- package/script/client/4_context.d.ts.map +1 -1
- package/script/client/4_context.js +23 -0
- package/script/client/4_forum_manager.d.ts +1 -0
- package/script/client/4_forum_manager.d.ts.map +1 -1
- package/script/client/4_forum_manager.js +5 -0
- package/script/client/6_client.d.ts +120 -9
- package/script/client/6_client.d.ts.map +1 -1
- package/script/client/6_client.js +150 -7
- package/script/client/6_client_dispatcher.d.ts +120 -9
- package/script/client/6_client_dispatcher.d.ts.map +1 -1
- package/script/client/6_client_dispatcher.js +150 -7
- package/script/types/1_available_reactions.d.ts +3 -2
- package/script/types/1_available_reactions.d.ts.map +1 -1
- package/script/types/1_available_reactions.js +18 -0
- package/script/types/1_channel_location.d.ts +8 -0
- package/script/types/1_channel_location.d.ts.map +1 -0
- package/script/types/1_channel_location.js +14 -0
- package/script/types/1_sticker_set_p.d.ts +48 -0
- package/script/types/1_sticker_set_p.d.ts.map +1 -0
- package/script/types/1_sticker_set_p.js +76 -0
- package/script/types/2_poll_voter.d.ts +19 -0
- package/script/types/2_poll_voter.d.ts.map +1 -1
- package/script/types/2_poll_voter.js +19 -0
- package/script/types/3_rich_text_component.d.ts +24 -0
- package/script/types/3_rich_text_component.d.ts.map +1 -1
- package/script/types/4_page_block.d.ts +45 -1
- package/script/types/4_page_block.d.ts.map +1 -1
- package/script/types/B_recent_action.d.ts +225 -0
- package/script/types/B_recent_action.d.ts.map +1 -0
- package/script/types/B_recent_action.js +306 -0
- package/script/types/B_topic_list_item.d.ts +22 -0
- package/script/types/B_topic_list_item.d.ts.map +1 -1
- package/script/types/B_topic_list_item.js +19 -0
- package/script/types/C_recent_actions_entry.d.ts +13 -0
- package/script/types/C_recent_actions_entry.d.ts.map +1 -0
- package/script/types/C_recent_actions_entry.js +16 -0
- package/script/types/C_topic_list.d.ts +20 -0
- package/script/types/C_topic_list.d.ts.map +1 -1
- package/script/types/C_topic_list.js +19 -0
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { Api } from "../2_tl.js";
|
|
2
|
+
import { type ChatMemberRights } from "./0_chat_member_rights.js";
|
|
3
|
+
import { type AvailableReactions } from "./1_available_reactions.js";
|
|
4
|
+
import { type ChannelLocation } from "./1_channel_location.js";
|
|
5
|
+
import type { PeerGetter } from "./1_chat_p.js";
|
|
6
|
+
import { type Photo } from "./1_photo.js";
|
|
7
|
+
import type { StickerSetNameGetter } from "./1_sticker.js";
|
|
8
|
+
import { type ChatMember } from "./2_chat_member.js";
|
|
9
|
+
import { type InviteLink } from "./3_invite_link.js";
|
|
10
|
+
import { type Message, type MessageGetter } from "./9_message.js";
|
|
11
|
+
import { type Topic } from "./A_topic.js";
|
|
12
|
+
export interface RecentActionChangeTitle {
|
|
13
|
+
type: "changeTitle";
|
|
14
|
+
previous: string;
|
|
15
|
+
new: string;
|
|
16
|
+
}
|
|
17
|
+
export interface RecentActionChangeDescription {
|
|
18
|
+
type: "changeDescription";
|
|
19
|
+
previous: string;
|
|
20
|
+
new: string;
|
|
21
|
+
}
|
|
22
|
+
export interface RecentActionChangeUsername {
|
|
23
|
+
type: "changeUsername";
|
|
24
|
+
previous: string;
|
|
25
|
+
new: string;
|
|
26
|
+
}
|
|
27
|
+
export interface RecentActionChangePhoto {
|
|
28
|
+
type: "changePhoto";
|
|
29
|
+
previous: Photo;
|
|
30
|
+
new: Photo;
|
|
31
|
+
}
|
|
32
|
+
export interface RecentActionToggleInvites {
|
|
33
|
+
type: "toggleInvites";
|
|
34
|
+
isEnabled: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface RecentActionToggleSignatures {
|
|
37
|
+
type: "toggleSignatures";
|
|
38
|
+
isEnabled: boolean;
|
|
39
|
+
}
|
|
40
|
+
export interface RecentActionPinMessage {
|
|
41
|
+
type: "pinMessage";
|
|
42
|
+
message: Message;
|
|
43
|
+
}
|
|
44
|
+
export interface RecentActionEditMessage {
|
|
45
|
+
type: "editMessage";
|
|
46
|
+
previous: Message;
|
|
47
|
+
new: Message;
|
|
48
|
+
}
|
|
49
|
+
export interface RecentActionDeleteMessage {
|
|
50
|
+
type: "deleteMessage";
|
|
51
|
+
message: Message;
|
|
52
|
+
}
|
|
53
|
+
export interface RecentActionJoin {
|
|
54
|
+
type: "join";
|
|
55
|
+
}
|
|
56
|
+
export interface RecentActionLeave {
|
|
57
|
+
type: "leave";
|
|
58
|
+
}
|
|
59
|
+
export interface RecentActionInvite {
|
|
60
|
+
type: "invite";
|
|
61
|
+
chatMember: ChatMember;
|
|
62
|
+
}
|
|
63
|
+
export interface RecentActionToggleRestriction {
|
|
64
|
+
type: "toggleRestriction";
|
|
65
|
+
previous: ChatMember;
|
|
66
|
+
new: ChatMember;
|
|
67
|
+
}
|
|
68
|
+
export interface RecentActionTogglePromotion {
|
|
69
|
+
type: "togglePromotion";
|
|
70
|
+
previous: ChatMember;
|
|
71
|
+
new: ChatMember;
|
|
72
|
+
}
|
|
73
|
+
export interface RecentActionChangeStickerSet {
|
|
74
|
+
type: "changeStickerSet";
|
|
75
|
+
previous?: string;
|
|
76
|
+
new?: string;
|
|
77
|
+
}
|
|
78
|
+
export interface RecentActionToggleChatHistoryForNewMembers {
|
|
79
|
+
type: "toggleChatHistoryForNewMembers";
|
|
80
|
+
isEnabled: boolean;
|
|
81
|
+
}
|
|
82
|
+
export interface RecentActionSetDefaultPermissions {
|
|
83
|
+
type: "setDefaultPermissions";
|
|
84
|
+
previous: ChatMemberRights;
|
|
85
|
+
new: ChatMemberRights;
|
|
86
|
+
}
|
|
87
|
+
export interface RecentActionStopPoll {
|
|
88
|
+
type: "stopPoll";
|
|
89
|
+
message: Message;
|
|
90
|
+
}
|
|
91
|
+
export interface RecentActionChangeDiscussionChat {
|
|
92
|
+
type: "changeDiscussionChat";
|
|
93
|
+
previous: number;
|
|
94
|
+
new: number;
|
|
95
|
+
}
|
|
96
|
+
export interface RecentActionChangeLocation {
|
|
97
|
+
type: "changeLocation";
|
|
98
|
+
previous?: ChannelLocation;
|
|
99
|
+
new?: ChannelLocation;
|
|
100
|
+
}
|
|
101
|
+
export interface RecentActionChangeSetSlowMode {
|
|
102
|
+
type: "setSlowMode";
|
|
103
|
+
previous: number;
|
|
104
|
+
new: number;
|
|
105
|
+
}
|
|
106
|
+
export interface RecentActionStartVideoChat {
|
|
107
|
+
type: "startVideoChat";
|
|
108
|
+
}
|
|
109
|
+
export interface RecentActionEndVideoChat {
|
|
110
|
+
type: "endVideoChat";
|
|
111
|
+
}
|
|
112
|
+
export interface RecentActionMuteVideoChatParticipant {
|
|
113
|
+
type: "muteVideoChatParticipant";
|
|
114
|
+
participant: number;
|
|
115
|
+
}
|
|
116
|
+
export interface RecentActionUnmuteVideoChatParticipant {
|
|
117
|
+
type: "unmuteVideoChatParticipant";
|
|
118
|
+
participant: number;
|
|
119
|
+
}
|
|
120
|
+
export interface RecentActionToggleVideoChatDefaultMuted {
|
|
121
|
+
type: "toggleVideoChatDefaultMuted";
|
|
122
|
+
defaultMuted: boolean;
|
|
123
|
+
}
|
|
124
|
+
export interface RecentActionJoinByInvite {
|
|
125
|
+
type: "joinByInvite";
|
|
126
|
+
inviteLink?: InviteLink;
|
|
127
|
+
isViaList: boolean;
|
|
128
|
+
}
|
|
129
|
+
export interface RecentActionDeleteInviteLink {
|
|
130
|
+
type: "deleteInviteLink";
|
|
131
|
+
inviteLink?: InviteLink;
|
|
132
|
+
}
|
|
133
|
+
export interface RecentActionRevokeInviteLink {
|
|
134
|
+
type: "revokeInviteLink";
|
|
135
|
+
inviteLink?: InviteLink;
|
|
136
|
+
}
|
|
137
|
+
export interface RecentActionEditInviteLink {
|
|
138
|
+
type: "editInviteLink";
|
|
139
|
+
previous?: InviteLink;
|
|
140
|
+
new?: InviteLink;
|
|
141
|
+
}
|
|
142
|
+
export interface RecentActionSetVideoChatParticipantVolume {
|
|
143
|
+
type: "setVideoChatParticipantVolume";
|
|
144
|
+
participant: number;
|
|
145
|
+
}
|
|
146
|
+
export interface RecentActionSetHistoryTtl {
|
|
147
|
+
type: "setHistoryTtl";
|
|
148
|
+
previous: number;
|
|
149
|
+
new: number;
|
|
150
|
+
}
|
|
151
|
+
export interface RecentActionJoinByRequest {
|
|
152
|
+
type: "joinByRequest";
|
|
153
|
+
inviteLink?: InviteLink;
|
|
154
|
+
approvedBy: number;
|
|
155
|
+
}
|
|
156
|
+
export interface RecentActionToggleContentProtection {
|
|
157
|
+
type: "toggleContentProtection";
|
|
158
|
+
isEnabled: boolean;
|
|
159
|
+
}
|
|
160
|
+
export interface RecentActionSendMessage {
|
|
161
|
+
type: "sendMessage";
|
|
162
|
+
message: Message;
|
|
163
|
+
}
|
|
164
|
+
export interface RecentActionSetAvailableReactions {
|
|
165
|
+
type: "setAvailableReactions";
|
|
166
|
+
previous: AvailableReactions;
|
|
167
|
+
new: AvailableReactions;
|
|
168
|
+
}
|
|
169
|
+
export interface RecentActionSetUsernames {
|
|
170
|
+
type: "setUsernames";
|
|
171
|
+
previous: string[];
|
|
172
|
+
new: string[];
|
|
173
|
+
}
|
|
174
|
+
export interface RecentActionToggleTopics {
|
|
175
|
+
type: "toggleTopics";
|
|
176
|
+
isEnabled: boolean;
|
|
177
|
+
}
|
|
178
|
+
export interface RecentActionCreateTopic {
|
|
179
|
+
type: "createTopic";
|
|
180
|
+
topic: Topic;
|
|
181
|
+
}
|
|
182
|
+
export interface RecentActionEditTopic {
|
|
183
|
+
type: "editTopic";
|
|
184
|
+
previous: Topic;
|
|
185
|
+
new: Topic;
|
|
186
|
+
}
|
|
187
|
+
export interface RecentActionDeleteTopic {
|
|
188
|
+
type: "deleteTopic";
|
|
189
|
+
topic: Topic;
|
|
190
|
+
}
|
|
191
|
+
export interface RecentActionPinTopic {
|
|
192
|
+
type: "pinTopic";
|
|
193
|
+
previous?: Topic;
|
|
194
|
+
new?: Topic;
|
|
195
|
+
}
|
|
196
|
+
export interface RecentActionToggleAntispam {
|
|
197
|
+
type: "toggleAntispam";
|
|
198
|
+
isEnabled: boolean;
|
|
199
|
+
}
|
|
200
|
+
export interface RecentActionSetEmojiStickerSet {
|
|
201
|
+
type: "setEmojiStickerSet";
|
|
202
|
+
previous?: string;
|
|
203
|
+
new?: string;
|
|
204
|
+
}
|
|
205
|
+
export interface RecentActionParticipantSubExtend {
|
|
206
|
+
type: "participantSubExtend";
|
|
207
|
+
previousParticipant: string;
|
|
208
|
+
newParticipant: string;
|
|
209
|
+
}
|
|
210
|
+
export interface RecentActionToggleAutomaticTranslation {
|
|
211
|
+
type: "toggleAutomaticTranslation";
|
|
212
|
+
isEnabled: boolean;
|
|
213
|
+
}
|
|
214
|
+
export interface RecentActionEditChatMemberTag {
|
|
215
|
+
type: "editChatMemberTag";
|
|
216
|
+
userId: number;
|
|
217
|
+
previous?: string;
|
|
218
|
+
new?: string;
|
|
219
|
+
}
|
|
220
|
+
export interface RecentActionUnsupported {
|
|
221
|
+
type: "unsupported";
|
|
222
|
+
}
|
|
223
|
+
export type RecentAction = RecentActionChangeTitle | RecentActionChangeDescription | RecentActionChangeUsername | RecentActionChangePhoto | RecentActionToggleInvites | RecentActionToggleSignatures | RecentActionPinMessage | RecentActionEditMessage | RecentActionDeleteMessage | RecentActionJoin | RecentActionLeave | RecentActionInvite | RecentActionToggleRestriction | RecentActionTogglePromotion | RecentActionChangeStickerSet | RecentActionToggleChatHistoryForNewMembers | RecentActionSetDefaultPermissions | RecentActionStopPoll | RecentActionChangeDiscussionChat | RecentActionChangeLocation | RecentActionChangeSetSlowMode | RecentActionStartVideoChat | RecentActionEndVideoChat | RecentActionMuteVideoChatParticipant | RecentActionUnmuteVideoChatParticipant | RecentActionToggleVideoChatDefaultMuted | RecentActionJoinByInvite | RecentActionDeleteInviteLink | RecentActionRevokeInviteLink | RecentActionEditInviteLink | RecentActionSetVideoChatParticipantVolume | RecentActionSetHistoryTtl | RecentActionJoinByRequest | RecentActionToggleContentProtection | RecentActionSendMessage | RecentActionSetAvailableReactions | RecentActionSetUsernames | RecentActionToggleTopics | RecentActionCreateTopic | RecentActionEditTopic | RecentActionDeleteTopic | RecentActionPinTopic | RecentActionToggleAntispam | RecentActionSetEmojiStickerSet | RecentActionToggleAutomaticTranslation | RecentActionEditChatMemberTag | RecentActionUnsupported;
|
|
224
|
+
export declare function constructRecentAction(a: Api.ChannelAdminLogEventAction, getPeer: PeerGetter, getMessage: MessageGetter, getStickerSetName: StickerSetNameGetter): Promise<RecentAction>;
|
|
225
|
+
//# sourceMappingURL=B_recent_action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"B_recent_action.d.ts","sourceRoot":"","sources":["../../src/types/B_recent_action.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAE,KAAK,gBAAgB,EAA6B,MAAM,2BAA2B,CAAC;AAC7F,OAAO,EAAE,KAAK,kBAAkB,EAA+B,MAAM,4BAA4B,CAAC;AAClG,OAAO,EAAE,KAAK,eAAe,EAA4B,MAAM,yBAAyB,CAAC;AACzF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAkB,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,KAAK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,CAAC,EAAE,GAAG,CAAC,0BAA0B,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,oBAAoB,GAAG,OAAO,CAAC,YAAY,CAAC,CAqR7L"}
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.constructRecentAction = constructRecentAction;
|
|
4
|
+
const _0_deps_js_1 = require("../0_deps.js");
|
|
5
|
+
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
6
|
+
const _2_tl_js_1 = require("../2_tl.js");
|
|
7
|
+
const _2_telegram_js_1 = require("../tl/2_telegram.js");
|
|
8
|
+
const _0_chat_member_rights_js_1 = require("./0_chat_member_rights.js");
|
|
9
|
+
const _1_available_reactions_js_1 = require("./1_available_reactions.js");
|
|
10
|
+
const _1_channel_location_js_1 = require("./1_channel_location.js");
|
|
11
|
+
const _1_photo_js_1 = require("./1_photo.js");
|
|
12
|
+
const _2_chat_member_js_1 = require("./2_chat_member.js");
|
|
13
|
+
const _3_invite_link_js_1 = require("./3_invite_link.js");
|
|
14
|
+
const _9_message_js_1 = require("./9_message.js");
|
|
15
|
+
const A_topic_js_1 = require("./A_topic.js");
|
|
16
|
+
function getChannelParticipantPeer(participant) {
|
|
17
|
+
switch (participant._) {
|
|
18
|
+
case "channelParticipant":
|
|
19
|
+
case "channelParticipantSelf":
|
|
20
|
+
case "channelParticipantCreator":
|
|
21
|
+
case "channelParticipantAdmin":
|
|
22
|
+
return { _: "peerUser", user_id: participant.user_id };
|
|
23
|
+
case "channelParticipantBanned":
|
|
24
|
+
case "channelParticipantLeft":
|
|
25
|
+
return participant.peer;
|
|
26
|
+
default:
|
|
27
|
+
(0, _0_deps_js_1.unreachable)();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
async function constructRecentAction(a, getPeer, getMessage, getStickerSetName) {
|
|
31
|
+
switch (a._) {
|
|
32
|
+
case "channelAdminLogEventActionChangeTitle":
|
|
33
|
+
return {
|
|
34
|
+
type: "changeTitle",
|
|
35
|
+
previous: a.prev_value,
|
|
36
|
+
new: a.new_value,
|
|
37
|
+
};
|
|
38
|
+
case "channelAdminLogEventActionChangeAbout":
|
|
39
|
+
return {
|
|
40
|
+
type: "changeDescription",
|
|
41
|
+
previous: a.prev_value,
|
|
42
|
+
new: a.new_value,
|
|
43
|
+
};
|
|
44
|
+
case "channelAdminLogEventActionChangeUsername":
|
|
45
|
+
return {
|
|
46
|
+
type: "changeUsername",
|
|
47
|
+
previous: a.prev_value,
|
|
48
|
+
new: a.prev_value,
|
|
49
|
+
};
|
|
50
|
+
case "channelAdminLogEventActionChangePhoto":
|
|
51
|
+
return {
|
|
52
|
+
type: "changePhoto",
|
|
53
|
+
previous: (0, _1_photo_js_1.constructPhoto)(_2_tl_js_1.Api.as("photo", a.prev_photo)),
|
|
54
|
+
new: (0, _1_photo_js_1.constructPhoto)(_2_tl_js_1.Api.as("photo", a.new_photo)),
|
|
55
|
+
};
|
|
56
|
+
case "channelAdminLogEventActionToggleInvites":
|
|
57
|
+
return {
|
|
58
|
+
type: "toggleInvites",
|
|
59
|
+
isEnabled: a.new_value,
|
|
60
|
+
};
|
|
61
|
+
case "channelAdminLogEventActionToggleSignatures":
|
|
62
|
+
return {
|
|
63
|
+
type: "toggleSignatures",
|
|
64
|
+
isEnabled: a.new_value,
|
|
65
|
+
};
|
|
66
|
+
case "channelAdminLogEventActionUpdatePinned":
|
|
67
|
+
return {
|
|
68
|
+
type: "pinMessage",
|
|
69
|
+
message: await (0, _9_message_js_1.constructMessage)(a.message, getPeer, getMessage, getStickerSetName, false),
|
|
70
|
+
};
|
|
71
|
+
case "channelAdminLogEventActionEditMessage":
|
|
72
|
+
return {
|
|
73
|
+
type: "editMessage",
|
|
74
|
+
previous: await (0, _9_message_js_1.constructMessage)(a.prev_message, getPeer, getMessage, getStickerSetName, false),
|
|
75
|
+
new: await (0, _9_message_js_1.constructMessage)(a.new_message, getPeer, getMessage, getStickerSetName, false),
|
|
76
|
+
};
|
|
77
|
+
case "channelAdminLogEventActionDeleteMessage":
|
|
78
|
+
return {
|
|
79
|
+
type: "deleteMessage",
|
|
80
|
+
message: await (0, _9_message_js_1.constructMessage)(a.message, getPeer, getMessage, getStickerSetName, false),
|
|
81
|
+
};
|
|
82
|
+
case "channelAdminLogEventActionParticipantJoin":
|
|
83
|
+
return {
|
|
84
|
+
type: "join",
|
|
85
|
+
};
|
|
86
|
+
case "channelAdminLogEventActionParticipantLeave":
|
|
87
|
+
return {
|
|
88
|
+
type: "leave",
|
|
89
|
+
};
|
|
90
|
+
case "channelAdminLogEventActionParticipantInvite": {
|
|
91
|
+
const peer = getPeer(getChannelParticipantPeer(a.participant));
|
|
92
|
+
if (peer === null) {
|
|
93
|
+
(0, _0_deps_js_1.unreachable)();
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
type: "invite",
|
|
97
|
+
chatMember: (0, _2_chat_member_js_1.constructChatMember)(peer[0], a.participant, getPeer),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
case "channelAdminLogEventActionParticipantToggleBan": {
|
|
101
|
+
const peer = getPeer(getChannelParticipantPeer(a.new_participant));
|
|
102
|
+
if (peer === null) {
|
|
103
|
+
(0, _0_deps_js_1.unreachable)();
|
|
104
|
+
}
|
|
105
|
+
return {
|
|
106
|
+
type: "toggleRestriction",
|
|
107
|
+
previous: (0, _2_chat_member_js_1.constructChatMember)(peer[0], a.prev_participant, getPeer),
|
|
108
|
+
new: (0, _2_chat_member_js_1.constructChatMember)(peer[0], a.new_participant, getPeer),
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
case "channelAdminLogEventActionParticipantToggleAdmin": {
|
|
112
|
+
const peer = getPeer(getChannelParticipantPeer(a.new_participant));
|
|
113
|
+
if (peer === null) {
|
|
114
|
+
(0, _0_deps_js_1.unreachable)();
|
|
115
|
+
}
|
|
116
|
+
return {
|
|
117
|
+
type: "togglePromotion",
|
|
118
|
+
previous: (0, _2_chat_member_js_1.constructChatMember)(peer[0], a.prev_participant, getPeer),
|
|
119
|
+
new: (0, _2_chat_member_js_1.constructChatMember)(peer[0], a.new_participant, getPeer),
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
case "channelAdminLogEventActionChangeStickerSet":
|
|
123
|
+
return (0, _1_utilities_js_1.cleanObject)({
|
|
124
|
+
type: "changeStickerSet",
|
|
125
|
+
previous: _2_tl_js_1.Api.is("inputStickerSetShortName", a.prev_stickerset) ? a.prev_stickerset.short_name : undefined,
|
|
126
|
+
new: _2_tl_js_1.Api.is("inputStickerSetShortName", a.new_stickerset) ? a.new_stickerset.short_name : undefined,
|
|
127
|
+
});
|
|
128
|
+
case "channelAdminLogEventActionTogglePreHistoryHidden":
|
|
129
|
+
return {
|
|
130
|
+
type: "toggleChatHistoryForNewMembers",
|
|
131
|
+
isEnabled: a.new_value,
|
|
132
|
+
};
|
|
133
|
+
case "channelAdminLogEventActionDefaultBannedRights":
|
|
134
|
+
return {
|
|
135
|
+
type: "setDefaultPermissions",
|
|
136
|
+
previous: (0, _0_chat_member_rights_js_1.constructChatMemberRights)(a.prev_banned_rights),
|
|
137
|
+
new: (0, _0_chat_member_rights_js_1.constructChatMemberRights)(a.new_banned_rights),
|
|
138
|
+
};
|
|
139
|
+
case "channelAdminLogEventActionStopPoll":
|
|
140
|
+
return {
|
|
141
|
+
type: "stopPoll",
|
|
142
|
+
message: await (0, _9_message_js_1.constructMessage)(a.message, getPeer, getMessage, getStickerSetName, false),
|
|
143
|
+
};
|
|
144
|
+
case "channelAdminLogEventActionChangeLinkedChat":
|
|
145
|
+
return {
|
|
146
|
+
type: "changeDiscussionChat",
|
|
147
|
+
previous: (0, _2_telegram_js_1.peerToChatId)({ _: "peerChannel", channel_id: a.prev_value }),
|
|
148
|
+
new: (0, _2_telegram_js_1.peerToChatId)({ _: "peerChannel", channel_id: a.new_value }),
|
|
149
|
+
};
|
|
150
|
+
case "channelAdminLogEventActionChangeLocation":
|
|
151
|
+
return (0, _1_utilities_js_1.cleanObject)({
|
|
152
|
+
type: "changeLocation",
|
|
153
|
+
previous: _2_tl_js_1.Api.is("channelLocation", a.prev_value) ? (0, _1_channel_location_js_1.constructChannelLocation)(a.prev_value) : undefined,
|
|
154
|
+
new: _2_tl_js_1.Api.is("channelLocation", a.new_value) ? (0, _1_channel_location_js_1.constructChannelLocation)(a.new_value) : undefined,
|
|
155
|
+
});
|
|
156
|
+
case "channelAdminLogEventActionToggleSlowMode":
|
|
157
|
+
return {
|
|
158
|
+
type: "setSlowMode",
|
|
159
|
+
previous: a.prev_value,
|
|
160
|
+
new: a.new_value,
|
|
161
|
+
};
|
|
162
|
+
case "channelAdminLogEventActionStartGroupCall":
|
|
163
|
+
return {
|
|
164
|
+
type: "startVideoChat",
|
|
165
|
+
};
|
|
166
|
+
case "channelAdminLogEventActionDiscardGroupCall":
|
|
167
|
+
return {
|
|
168
|
+
type: "endVideoChat",
|
|
169
|
+
};
|
|
170
|
+
case "channelAdminLogEventActionParticipantMute":
|
|
171
|
+
return {
|
|
172
|
+
type: "muteVideoChatParticipant",
|
|
173
|
+
participant: (0, _2_telegram_js_1.peerToChatId)(a.participant.peer),
|
|
174
|
+
};
|
|
175
|
+
case "channelAdminLogEventActionParticipantUnmute":
|
|
176
|
+
return {
|
|
177
|
+
type: "unmuteVideoChatParticipant",
|
|
178
|
+
participant: (0, _2_telegram_js_1.peerToChatId)(a.participant.peer),
|
|
179
|
+
};
|
|
180
|
+
case "channelAdminLogEventActionToggleGroupCallSetting":
|
|
181
|
+
return {
|
|
182
|
+
type: "toggleVideoChatDefaultMuted",
|
|
183
|
+
defaultMuted: a.join_muted,
|
|
184
|
+
};
|
|
185
|
+
case "channelAdminLogEventActionParticipantJoinByInvite":
|
|
186
|
+
return (0, _1_utilities_js_1.cleanObject)({
|
|
187
|
+
type: "joinByInvite",
|
|
188
|
+
inviteLink: _2_tl_js_1.Api.is("chatInviteExported", a.invite) ? (0, _3_invite_link_js_1.constructInviteLink)(a.invite, getPeer) : undefined,
|
|
189
|
+
isViaList: !!a.via_chatlist,
|
|
190
|
+
});
|
|
191
|
+
case "channelAdminLogEventActionExportedInviteDelete":
|
|
192
|
+
return (0, _1_utilities_js_1.cleanObject)({
|
|
193
|
+
type: "deleteInviteLink",
|
|
194
|
+
inviteLink: _2_tl_js_1.Api.is("chatInviteExported", a.invite) ? (0, _3_invite_link_js_1.constructInviteLink)(a.invite, getPeer) : undefined,
|
|
195
|
+
});
|
|
196
|
+
case "channelAdminLogEventActionExportedInviteRevoke":
|
|
197
|
+
return (0, _1_utilities_js_1.cleanObject)({
|
|
198
|
+
type: "revokeInviteLink",
|
|
199
|
+
inviteLink: _2_tl_js_1.Api.is("chatInviteExported", a.invite) ? (0, _3_invite_link_js_1.constructInviteLink)(a.invite, getPeer) : undefined,
|
|
200
|
+
});
|
|
201
|
+
case "channelAdminLogEventActionExportedInviteEdit":
|
|
202
|
+
return (0, _1_utilities_js_1.cleanObject)({
|
|
203
|
+
type: "editInviteLink",
|
|
204
|
+
previous: _2_tl_js_1.Api.is("chatInviteExported", a.prev_invite) ? (0, _3_invite_link_js_1.constructInviteLink)(a.prev_invite, getPeer) : undefined,
|
|
205
|
+
new: _2_tl_js_1.Api.is("chatInviteExported", a.new_invite) ? (0, _3_invite_link_js_1.constructInviteLink)(a.new_invite, getPeer) : undefined,
|
|
206
|
+
});
|
|
207
|
+
case "channelAdminLogEventActionParticipantVolume":
|
|
208
|
+
return {
|
|
209
|
+
type: "setVideoChatParticipantVolume",
|
|
210
|
+
participant: (0, _2_telegram_js_1.peerToChatId)(a.participant.peer),
|
|
211
|
+
};
|
|
212
|
+
case "channelAdminLogEventActionChangeHistoryTTL":
|
|
213
|
+
return {
|
|
214
|
+
type: "setHistoryTtl",
|
|
215
|
+
previous: a.prev_value,
|
|
216
|
+
new: a.new_value,
|
|
217
|
+
};
|
|
218
|
+
case "channelAdminLogEventActionParticipantJoinByRequest":
|
|
219
|
+
return (0, _1_utilities_js_1.cleanObject)({
|
|
220
|
+
type: "joinByRequest",
|
|
221
|
+
inviteLink: _2_tl_js_1.Api.is("chatInviteExported", a.invite) ? (0, _3_invite_link_js_1.constructInviteLink)(a.invite, getPeer) : undefined,
|
|
222
|
+
approvedBy: Number(a.approved_by),
|
|
223
|
+
});
|
|
224
|
+
case "channelAdminLogEventActionToggleNoForwards":
|
|
225
|
+
return {
|
|
226
|
+
type: "toggleContentProtection",
|
|
227
|
+
isEnabled: a.new_value,
|
|
228
|
+
};
|
|
229
|
+
case "channelAdminLogEventActionSendMessage":
|
|
230
|
+
return {
|
|
231
|
+
type: "sendMessage",
|
|
232
|
+
message: await (0, _9_message_js_1.constructMessage)(a.message, getPeer, getMessage, getStickerSetName, false),
|
|
233
|
+
};
|
|
234
|
+
case "channelAdminLogEventActionChangeAvailableReactions":
|
|
235
|
+
return {
|
|
236
|
+
type: "setAvailableReactions",
|
|
237
|
+
previous: (0, _1_available_reactions_js_1.constructAvailableReactions)(a.prev_value),
|
|
238
|
+
new: (0, _1_available_reactions_js_1.constructAvailableReactions)(a.new_value),
|
|
239
|
+
};
|
|
240
|
+
case "channelAdminLogEventActionChangeUsernames":
|
|
241
|
+
return {
|
|
242
|
+
type: "setUsernames",
|
|
243
|
+
previous: a.prev_value,
|
|
244
|
+
new: a.new_value,
|
|
245
|
+
};
|
|
246
|
+
case "channelAdminLogEventActionToggleForum":
|
|
247
|
+
return {
|
|
248
|
+
type: "toggleAntispam",
|
|
249
|
+
isEnabled: a.new_value,
|
|
250
|
+
};
|
|
251
|
+
case "channelAdminLogEventActionCreateTopic":
|
|
252
|
+
return {
|
|
253
|
+
type: "createTopic",
|
|
254
|
+
topic: (0, A_topic_js_1.constructTopic2)(a.topic, getPeer),
|
|
255
|
+
};
|
|
256
|
+
case "channelAdminLogEventActionEditTopic":
|
|
257
|
+
return {
|
|
258
|
+
type: "editTopic",
|
|
259
|
+
previous: (0, A_topic_js_1.constructTopic2)(a.prev_topic, getPeer),
|
|
260
|
+
new: (0, A_topic_js_1.constructTopic2)(a.new_topic, getPeer),
|
|
261
|
+
};
|
|
262
|
+
case "channelAdminLogEventActionDeleteTopic":
|
|
263
|
+
return {
|
|
264
|
+
type: "deleteTopic",
|
|
265
|
+
topic: (0, A_topic_js_1.constructTopic2)(a.topic, getPeer),
|
|
266
|
+
};
|
|
267
|
+
case "channelAdminLogEventActionPinTopic":
|
|
268
|
+
return (0, _1_utilities_js_1.cleanObject)({
|
|
269
|
+
type: "pinTopic",
|
|
270
|
+
previous: a.prev_topic ? (0, A_topic_js_1.constructTopic2)(a.prev_topic, getPeer) : undefined,
|
|
271
|
+
new: a.new_topic ? (0, A_topic_js_1.constructTopic2)(a.new_topic, getPeer) : undefined,
|
|
272
|
+
});
|
|
273
|
+
case "channelAdminLogEventActionToggleAntiSpam":
|
|
274
|
+
return {
|
|
275
|
+
type: "toggleAntispam",
|
|
276
|
+
isEnabled: a.new_value,
|
|
277
|
+
};
|
|
278
|
+
case "channelAdminLogEventActionChangeEmojiStickerSet":
|
|
279
|
+
return (0, _1_utilities_js_1.cleanObject)({
|
|
280
|
+
type: "setEmojiStickerSet",
|
|
281
|
+
previous: _2_tl_js_1.Api.is("inputStickerSetShortName", a.prev_stickerset) ? a.prev_stickerset.short_name : undefined,
|
|
282
|
+
new: _2_tl_js_1.Api.is("inputStickerSetShortName", a.new_stickerset) ? a.new_stickerset.short_name : undefined,
|
|
283
|
+
});
|
|
284
|
+
case "channelAdminLogEventActionToggleSignatureProfiles":
|
|
285
|
+
return {
|
|
286
|
+
type: "toggleSignatures",
|
|
287
|
+
isEnabled: a.new_value,
|
|
288
|
+
};
|
|
289
|
+
case "channelAdminLogEventActionToggleAutotranslation":
|
|
290
|
+
return {
|
|
291
|
+
type: "toggleAutomaticTranslation",
|
|
292
|
+
isEnabled: a.new_value,
|
|
293
|
+
};
|
|
294
|
+
case "channelAdminLogEventActionParticipantEditRank":
|
|
295
|
+
return (0, _1_utilities_js_1.cleanObject)({
|
|
296
|
+
type: "editChatMemberTag",
|
|
297
|
+
userId: Number(a.user_id),
|
|
298
|
+
previous: a.prev_rank || undefined,
|
|
299
|
+
newTag: a.new_rank || undefined,
|
|
300
|
+
});
|
|
301
|
+
default:
|
|
302
|
+
return {
|
|
303
|
+
type: "unsupported",
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
}
|
|
@@ -1,7 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
3
|
+
* Copyright (C) 2023-2026 Roj <https://roj.im/>
|
|
4
|
+
*
|
|
5
|
+
* This file is part of MTKruto.
|
|
6
|
+
*
|
|
7
|
+
* This program is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
* (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* This program is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* GNU Lesser General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
*/
|
|
1
20
|
import type { Message } from "./9_message.js";
|
|
2
21
|
import type { Topic } from "./A_topic.js";
|
|
22
|
+
/** An item of a topic list. */
|
|
3
23
|
export interface TopicListItem {
|
|
24
|
+
/** The topic. */
|
|
4
25
|
topic: Topic;
|
|
26
|
+
/** The topic's last message. */
|
|
5
27
|
lastMessage?: Message;
|
|
6
28
|
}
|
|
7
29
|
//# sourceMappingURL=B_topic_list_item.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"B_topic_list_item.d.ts","sourceRoot":"","sources":["../../src/types/B_topic_list_item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB"}
|
|
1
|
+
{"version":3,"file":"B_topic_list_item.d.ts","sourceRoot":"","sources":["../../src/types/B_topic_list_item.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,+BAA+B;AAC/B,MAAM,WAAW,aAAa;IAC5B,iBAAiB;IACjB,KAAK,EAAE,KAAK,CAAC;IACb,gCAAgC;IAChC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB"}
|
|
@@ -1,2 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
4
|
+
* Copyright (C) 2023-2026 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
|
+
*/
|
|
2
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Api } from "../2_tl.js";
|
|
2
|
+
import type { PeerGetter } from "./1_chat_p.js";
|
|
3
|
+
import type { StickerSetNameGetter } from "./1_sticker.js";
|
|
4
|
+
import type { MessageGetter } from "./9_message.js";
|
|
5
|
+
import { type RecentAction } from "./B_recent_action.js";
|
|
6
|
+
export interface RecentActionsEntry {
|
|
7
|
+
id: string;
|
|
8
|
+
date: number;
|
|
9
|
+
userId: number;
|
|
10
|
+
action: RecentAction;
|
|
11
|
+
}
|
|
12
|
+
export declare function constructRecentActionsEntry(cale: Api.ChannelAdminLogEvent, getPeer: PeerGetter, getMessage: MessageGetter, getStickerSetName: StickerSetNameGetter): Promise<RecentActionsEntry>;
|
|
13
|
+
//# sourceMappingURL=C_recent_actions_entry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"C_recent_actions_entry.d.ts","sourceRoot":"","sources":["../../src/types/C_recent_actions_entry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAyB,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEhF,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,wBAAsB,2BAA2B,CAAC,IAAI,EAAE,GAAG,CAAC,oBAAoB,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,oBAAoB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAWtM"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.constructRecentActionsEntry = constructRecentActionsEntry;
|
|
4
|
+
const B_recent_action_js_1 = require("./B_recent_action.js");
|
|
5
|
+
async function constructRecentActionsEntry(cale, getPeer, getMessage, getStickerSetName) {
|
|
6
|
+
const id = String(cale.id);
|
|
7
|
+
const userId = Number(cale.user_id);
|
|
8
|
+
const date = cale.date;
|
|
9
|
+
const action = await (0, B_recent_action_js_1.constructRecentAction)(cale.action, getPeer, getMessage, getStickerSetName);
|
|
10
|
+
return {
|
|
11
|
+
id,
|
|
12
|
+
date,
|
|
13
|
+
userId,
|
|
14
|
+
action,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -1,7 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
3
|
+
* Copyright (C) 2023-2026 Roj <https://roj.im/>
|
|
4
|
+
*
|
|
5
|
+
* This file is part of MTKruto.
|
|
6
|
+
*
|
|
7
|
+
* This program is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
* (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* This program is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* GNU Lesser General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
*/
|
|
1
20
|
import { Api } from "../2_tl.js";
|
|
2
21
|
import type { PeerGetter } from "./1_chat_p.js";
|
|
3
22
|
import type { Message } from "./9_message.js";
|
|
4
23
|
import type { TopicListItem } from "./B_topic_list_item.js";
|
|
24
|
+
/** A list of topics. */
|
|
5
25
|
export interface TopicList {
|
|
6
26
|
/** The items in this list. */
|
|
7
27
|
items: TopicListItem[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"C_topic_list.d.ts","sourceRoot":"","sources":["../../src/types/C_topic_list.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"C_topic_list.d.ts","sourceRoot":"","sources":["../../src/types/C_topic_list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,wBAAwB;AACxB,MAAM,WAAW,SAAS;IACxB,8BAA8B;IAC9B,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,4DAA4D;IAC5D,uBAAuB,EAAE,OAAO,CAAC;IACjC,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,GAAG,CAAC,oBAAoB,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,GAAG,SAAS,CAKxH"}
|