@mtkruto/node 0.192.0 → 0.194.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/0_errors.d.ts +6 -0
- package/esm/0_errors.d.ts.map +1 -1
- package/esm/0_errors.js +12 -0
- package/esm/3_types.d.ts +8 -2
- package/esm/3_types.d.ts.map +1 -1
- package/esm/3_types.js +8 -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 +9 -7
- package/esm/client/0_params.d.ts +51 -0
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/0_password.js +5 -5
- package/esm/client/0_storage_operations.d.ts +9 -0
- package/esm/client/0_storage_operations.d.ts.map +1 -1
- package/esm/client/0_storage_operations.js +40 -51
- package/esm/client/1_client_generic.d.ts +161 -13
- package/esm/client/1_client_generic.d.ts.map +1 -1
- package/esm/client/1_client_plain.d.ts.map +1 -1
- package/esm/client/1_client_plain.js +2 -1
- package/esm/client/2_client_encrypted.d.ts.map +1 -1
- package/esm/client/2_client_encrypted.js +2 -4
- package/esm/client/2_reaction_manager.d.ts +2 -1
- package/esm/client/2_reaction_manager.d.ts.map +1 -1
- package/esm/client/2_reaction_manager.js +7 -0
- package/esm/client/2_update_manager.d.ts +1 -1
- package/esm/client/2_update_manager.d.ts.map +1 -1
- package/esm/client/2_update_manager.js +13 -12
- package/esm/client/3_account_manager.d.ts +8 -2
- package/esm/client/3_account_manager.d.ts.map +1 -1
- package/esm/client/3_account_manager.js +54 -2
- package/esm/client/3_message_manager.js +6 -6
- 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 +9 -3
- package/esm/client/4_chat_manager.d.ts.map +1 -1
- package/esm/client/4_chat_manager.js +102 -3
- package/esm/client/4_checklist_manager.js +1 -1
- package/esm/client/4_context.d.ts +17 -3
- package/esm/client/4_context.d.ts.map +1 -1
- package/esm/client/4_context.js +38 -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 +159 -11
- package/esm/client/6_client.d.ts.map +1 -1
- package/esm/client/6_client.js +223 -25
- package/esm/client/6_client_dispatcher.d.ts +160 -12
- package/esm/client/6_client_dispatcher.d.ts.map +1 -1
- package/esm/client/6_client_dispatcher.js +198 -8
- package/esm/storage/2_storage_indexed_db.js +5 -5
- package/esm/storage/2_storage_session_storage.js +2 -2
- package/esm/tl/0_utilities.d.ts +1 -1
- package/esm/tl/0_utilities.d.ts.map +1 -1
- package/esm/tl/0_utilities.js +3 -2
- package/esm/tl/1_tl_reader.js +1 -1
- package/esm/tl/1_tl_writer.js +1 -1
- 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 +27 -0
- package/esm/types/1_channel_location.d.ts.map +1 -0
- package/esm/types/1_channel_location.js +30 -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_chat_join_result.d.ts +40 -0
- package/esm/types/3_chat_join_result.d.ts.map +1 -0
- package/esm/types/3_chat_join_result.js +45 -0
- package/esm/types/3_resolved_invite_link.d.ts +63 -0
- package/esm/types/3_resolved_invite_link.d.ts.map +1 -0
- package/esm/types/3_resolved_invite_link.js +45 -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 +244 -0
- package/esm/types/B_recent_action.d.ts.map +1 -0
- package/esm/types/B_recent_action.js +322 -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 +32 -0
- package/esm/types/C_recent_actions_entry.d.ts.map +1 -0
- package/esm/types/C_recent_actions_entry.js +32 -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/esm/utilities/1_auth.d.ts.map +1 -1
- package/esm/utilities/1_auth.js +2 -1
- package/package.json +1 -1
- package/script/0_errors.d.ts +6 -0
- package/script/0_errors.d.ts.map +1 -1
- package/script/0_errors.js +15 -1
- package/script/3_types.d.ts +8 -2
- package/script/3_types.d.ts.map +1 -1
- package/script/3_types.js +8 -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 +8 -6
- package/script/client/0_params.d.ts +51 -0
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/0_password.js +5 -5
- package/script/client/0_storage_operations.d.ts +9 -0
- package/script/client/0_storage_operations.d.ts.map +1 -1
- package/script/client/0_storage_operations.js +42 -53
- package/script/client/1_client_generic.d.ts +161 -13
- package/script/client/1_client_generic.d.ts.map +1 -1
- package/script/client/1_client_plain.d.ts.map +1 -1
- package/script/client/1_client_plain.js +2 -1
- package/script/client/2_client_encrypted.d.ts.map +1 -1
- package/script/client/2_client_encrypted.js +4 -6
- package/script/client/2_reaction_manager.d.ts +2 -1
- package/script/client/2_reaction_manager.d.ts.map +1 -1
- package/script/client/2_reaction_manager.js +7 -0
- package/script/client/2_update_manager.d.ts +1 -1
- package/script/client/2_update_manager.d.ts.map +1 -1
- package/script/client/2_update_manager.js +13 -12
- package/script/client/3_account_manager.d.ts +8 -2
- package/script/client/3_account_manager.d.ts.map +1 -1
- package/script/client/3_account_manager.js +54 -2
- package/script/client/3_message_manager.js +6 -6
- 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 +9 -3
- package/script/client/4_chat_manager.d.ts.map +1 -1
- package/script/client/4_chat_manager.js +101 -2
- package/script/client/4_checklist_manager.js +1 -1
- package/script/client/4_context.d.ts +17 -3
- package/script/client/4_context.d.ts.map +1 -1
- package/script/client/4_context.js +38 -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 +159 -11
- package/script/client/6_client.d.ts.map +1 -1
- package/script/client/6_client.js +223 -25
- package/script/client/6_client_dispatcher.d.ts +160 -12
- package/script/client/6_client_dispatcher.d.ts.map +1 -1
- package/script/client/6_client_dispatcher.js +198 -8
- package/script/storage/2_storage_indexed_db.js +5 -5
- package/script/storage/2_storage_session_storage.js +2 -2
- package/script/tl/0_utilities.d.ts +1 -1
- package/script/tl/0_utilities.d.ts.map +1 -1
- package/script/tl/0_utilities.js +3 -2
- package/script/tl/1_tl_reader.js +1 -1
- package/script/tl/1_tl_writer.js +1 -1
- 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 +27 -0
- package/script/types/1_channel_location.d.ts.map +1 -0
- package/script/types/1_channel_location.js +33 -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_chat_join_result.d.ts +40 -0
- package/script/types/3_chat_join_result.d.ts.map +1 -0
- package/script/types/3_chat_join_result.js +48 -0
- package/script/types/3_resolved_invite_link.d.ts +63 -0
- package/script/types/3_resolved_invite_link.d.ts.map +1 -0
- package/script/types/3_resolved_invite_link.js +48 -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 +244 -0
- package/script/types/B_recent_action.d.ts.map +1 -0
- package/script/types/B_recent_action.js +325 -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 +32 -0
- package/script/types/C_recent_actions_entry.d.ts.map +1 -0
- package/script/types/C_recent_actions_entry.js +35 -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
- package/script/utilities/1_auth.d.ts.map +1 -1
- package/script/utilities/1_auth.js +2 -1
|
@@ -26,6 +26,8 @@ import { Api, repr, SecretChats, TLReader, TLWriter, X } from "../2_tl.js";
|
|
|
26
26
|
import { deserializeFileId, secretMessageEntityToTlObject } from "../3_types.js";
|
|
27
27
|
import { constructSecretChat } from "../types/0_secret_chat.js";
|
|
28
28
|
import { constructSecretMessage } from "../types/2_secret_message.js";
|
|
29
|
+
import { parseHtml } from "./0_html.js";
|
|
30
|
+
import { parseMarkdown } from "./0_markdown.js";
|
|
29
31
|
import { isGoodModExpFirst, isSafePrime } from "./0_password.js";
|
|
30
32
|
import { SecretChatState } from "./0_secret_chat_state.js";
|
|
31
33
|
import { checkPhotoName } from "./0_utilities.js";
|
|
@@ -125,6 +127,45 @@ export class SecretChatManager {
|
|
|
125
127
|
state.pendingExponent = a;
|
|
126
128
|
return constructSecretChat(result);
|
|
127
129
|
}
|
|
130
|
+
static parseText(text, entities, parseMode, isEmptyAllowed = false) {
|
|
131
|
+
switch (parseMode) {
|
|
132
|
+
case null:
|
|
133
|
+
break;
|
|
134
|
+
case "HTML": {
|
|
135
|
+
const [newText, entitiesToPush] = parseHtml(text, true);
|
|
136
|
+
text = newText;
|
|
137
|
+
for (const entity of entitiesToPush) {
|
|
138
|
+
entities.push(entity);
|
|
139
|
+
}
|
|
140
|
+
break;
|
|
141
|
+
}
|
|
142
|
+
case "Markdown": {
|
|
143
|
+
const [newText, entitiesToPush] = parseMarkdown(text, true);
|
|
144
|
+
text = newText;
|
|
145
|
+
for (const entity of entitiesToPush) {
|
|
146
|
+
entities.push(entity);
|
|
147
|
+
}
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
default:
|
|
151
|
+
unreachable();
|
|
152
|
+
}
|
|
153
|
+
text = text.trimEnd();
|
|
154
|
+
for (const entity of entities) {
|
|
155
|
+
while (text[entity.offset + (entity.length - 1)] === undefined) {
|
|
156
|
+
--entity.length;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
if (!isEmptyAllowed && !text.length) {
|
|
160
|
+
throw new InputError("Text must not be empty.");
|
|
161
|
+
}
|
|
162
|
+
return [text, entities];
|
|
163
|
+
}
|
|
164
|
+
parseText(text_, params, isEmptyAllowed) {
|
|
165
|
+
const [text, entities_] = _a.parseText(text_, params?.entities ?? [], params?.parseMode === null ? null : params?.parseMode ?? this.#c.parseMode, isEmptyAllowed);
|
|
166
|
+
const entities = entities_?.length > 0 ? entities_.map(secretMessageEntityToTlObject) : undefined;
|
|
167
|
+
return [text, entities];
|
|
168
|
+
}
|
|
128
169
|
async acceptSecretChat(id) {
|
|
129
170
|
const state = this.#getSecretChatState(id);
|
|
130
171
|
if (!Api.is("encryptedChatRequested", state.encryptedChat)) {
|
|
@@ -202,15 +243,16 @@ export class SecretChatManager {
|
|
|
202
243
|
async sendSecretMessage(id, text, params) {
|
|
203
244
|
this.#c.storage.assertUser("sendSecretMessage");
|
|
204
245
|
const state = this.#mustGetEncryptedChat(id);
|
|
246
|
+
const [message, entities] = this.parseText(text, params);
|
|
205
247
|
const random_id = getRandomId();
|
|
206
248
|
const decryptedMessage = {
|
|
207
249
|
_: "decryptedMessage",
|
|
208
|
-
message
|
|
250
|
+
message,
|
|
209
251
|
random_id,
|
|
210
252
|
ttl: params?.ttl ?? 0,
|
|
211
253
|
silent: params?.isSilent || undefined,
|
|
212
254
|
reply_to_random_id: params?.replyToMessageId ? BigInt(params.replyToMessageId) : undefined,
|
|
213
|
-
entities
|
|
255
|
+
entities,
|
|
214
256
|
via_bot_name: params?.viaBot,
|
|
215
257
|
};
|
|
216
258
|
await this.#sendMessage(decryptedMessage, state.encryptedChat, state.authKey, state.authKeyId_);
|
|
@@ -275,13 +317,14 @@ export class SecretChatManager {
|
|
|
275
317
|
async sendSecretDocument(id, document, params) {
|
|
276
318
|
this.#c.storage.assertUser("sendSecretDocument");
|
|
277
319
|
const state = this.#mustGetEncryptedChat(id);
|
|
320
|
+
const [message, entities] = this.parseText(params?.caption ?? "", params);
|
|
278
321
|
const [key, iv] = this.#generateKeyIv();
|
|
279
322
|
const { inputEncryptedFile, fileSize } = await this.#c.fileManager.upload(document, params, null, true, { key, iv });
|
|
280
323
|
const random_id = getRandomId();
|
|
281
324
|
const decryptedMessage = {
|
|
282
325
|
_: "decryptedMessage",
|
|
283
|
-
message
|
|
284
|
-
entities
|
|
326
|
+
message,
|
|
327
|
+
entities,
|
|
285
328
|
random_id,
|
|
286
329
|
ttl: params?.ttl ?? 0,
|
|
287
330
|
silent: params?.isSilent || undefined,
|
|
@@ -306,13 +349,14 @@ export class SecretChatManager {
|
|
|
306
349
|
async sendSecretVideo(id, video, params) {
|
|
307
350
|
this.#c.storage.assertUser("sendSecretVideo");
|
|
308
351
|
const state = this.#mustGetEncryptedChat(id);
|
|
352
|
+
const [message, entities] = this.parseText(params?.caption ?? "", params);
|
|
309
353
|
const [key, iv] = this.#generateKeyIv();
|
|
310
354
|
const { inputEncryptedFile, fileSize } = await this.#c.fileManager.upload(video, params, null, true, { key, iv });
|
|
311
355
|
const random_id = getRandomId();
|
|
312
356
|
const decryptedMessage = {
|
|
313
357
|
_: "decryptedMessage",
|
|
314
|
-
message
|
|
315
|
-
entities
|
|
358
|
+
message,
|
|
359
|
+
entities,
|
|
316
360
|
random_id,
|
|
317
361
|
ttl: params?.ttl ?? 0,
|
|
318
362
|
silent: params?.isSilent || undefined,
|
|
@@ -340,13 +384,14 @@ export class SecretChatManager {
|
|
|
340
384
|
async sendSecretVideoNote(id, videoNote, params) {
|
|
341
385
|
this.#c.storage.assertUser("sendSecretVideoNote");
|
|
342
386
|
const state = this.#mustGetEncryptedChat(id);
|
|
387
|
+
const [message, entities] = this.parseText(params?.caption ?? "", params);
|
|
343
388
|
const [key, iv] = this.#generateKeyIv();
|
|
344
389
|
const { inputEncryptedFile, fileSize } = await this.#c.fileManager.upload(videoNote, params, null, true, { key, iv });
|
|
345
390
|
const random_id = getRandomId();
|
|
346
391
|
const decryptedMessage = {
|
|
347
392
|
_: "decryptedMessage",
|
|
348
|
-
message
|
|
349
|
-
entities
|
|
393
|
+
message,
|
|
394
|
+
entities,
|
|
350
395
|
random_id,
|
|
351
396
|
ttl: params?.ttl ?? 0,
|
|
352
397
|
silent: params?.isSilent || undefined,
|
|
@@ -374,13 +419,14 @@ export class SecretChatManager {
|
|
|
374
419
|
async sendSecretAudio(id, audio, params) {
|
|
375
420
|
this.#c.storage.assertUser("sendSecretAudio");
|
|
376
421
|
const state = this.#mustGetEncryptedChat(id);
|
|
422
|
+
const [message, entities] = this.parseText(params?.caption ?? "", params);
|
|
377
423
|
const [key, iv] = this.#generateKeyIv();
|
|
378
424
|
const { inputEncryptedFile, fileSize } = await this.#c.fileManager.upload(audio, params, null, true, { key, iv });
|
|
379
425
|
const random_id = getRandomId();
|
|
380
426
|
const decryptedMessage = {
|
|
381
427
|
_: "decryptedMessage",
|
|
382
|
-
message
|
|
383
|
-
entities
|
|
428
|
+
message,
|
|
429
|
+
entities,
|
|
384
430
|
random_id,
|
|
385
431
|
ttl: params?.ttl ?? 0,
|
|
386
432
|
silent: params?.isSilent || undefined,
|
|
@@ -408,13 +454,14 @@ export class SecretChatManager {
|
|
|
408
454
|
async sendSecretVoice(id, voice, params) {
|
|
409
455
|
this.#c.storage.assertUser("sendSecretVoice");
|
|
410
456
|
const state = this.#mustGetEncryptedChat(id);
|
|
457
|
+
const [message, entities] = this.parseText(params?.caption ?? "", params);
|
|
411
458
|
const [key, iv] = this.#generateKeyIv();
|
|
412
459
|
const { inputEncryptedFile, fileSize } = await this.#c.fileManager.upload(voice, params, null, true, { key, iv });
|
|
413
460
|
const random_id = getRandomId();
|
|
414
461
|
const decryptedMessage = {
|
|
415
462
|
_: "decryptedMessage",
|
|
416
|
-
message
|
|
417
|
-
entities
|
|
463
|
+
message,
|
|
464
|
+
entities,
|
|
418
465
|
random_id,
|
|
419
466
|
ttl: params?.ttl ?? 0,
|
|
420
467
|
silent: params?.isSilent || undefined,
|
|
@@ -442,13 +489,14 @@ export class SecretChatManager {
|
|
|
442
489
|
async sendSecretAnimation(id, animation, params) {
|
|
443
490
|
this.#c.storage.assertUser("sendSecretAnimation");
|
|
444
491
|
const state = this.#mustGetEncryptedChat(id);
|
|
492
|
+
const [message, entities] = this.parseText(params?.caption ?? "", params);
|
|
445
493
|
const [key, iv] = this.#generateKeyIv();
|
|
446
494
|
const { inputEncryptedFile, fileSize } = await this.#c.fileManager.upload(animation, params, null, true, { key, iv });
|
|
447
495
|
const random_id = getRandomId();
|
|
448
496
|
const decryptedMessage = {
|
|
449
497
|
_: "decryptedMessage",
|
|
450
|
-
message
|
|
451
|
-
entities
|
|
498
|
+
message,
|
|
499
|
+
entities,
|
|
452
500
|
random_id,
|
|
453
501
|
ttl: params?.ttl ?? 0,
|
|
454
502
|
silent: params?.isSilent || undefined,
|
|
@@ -492,13 +540,14 @@ export class SecretChatManager {
|
|
|
492
540
|
async sendSecretPhoto(id, photo, params) {
|
|
493
541
|
this.#c.storage.assertUser("sendSecretPhoto");
|
|
494
542
|
const state = this.#mustGetEncryptedChat(id);
|
|
543
|
+
const [message, entities] = this.parseText(params?.caption ?? "", params);
|
|
495
544
|
const [key, iv] = this.#generateKeyIv();
|
|
496
545
|
const { inputEncryptedFile, fileSize } = await this.#c.fileManager.upload(photo, params, checkPhotoName(params), true, { key, iv });
|
|
497
546
|
const random_id = getRandomId();
|
|
498
547
|
const decryptedMessage = {
|
|
499
548
|
_: "decryptedMessage",
|
|
500
|
-
message
|
|
501
|
-
entities
|
|
549
|
+
message,
|
|
550
|
+
entities,
|
|
502
551
|
random_id,
|
|
503
552
|
ttl: params?.ttl ?? 0,
|
|
504
553
|
silent: params?.isSilent || undefined,
|
|
@@ -41,6 +41,11 @@ export declare class StickerSetManager {
|
|
|
41
41
|
setCustomEmojiAsStickerSetThumbnail(slug: string, customEmojiId: string): Promise<void>;
|
|
42
42
|
getStickerSet(slug: string): Promise<import("../3_types.js").StickerSet>;
|
|
43
43
|
getDiceStickerSet(emoji: string): Promise<import("../3_types.js").StickerSet>;
|
|
44
|
+
addStickerSet(slug: string): Promise<void>;
|
|
45
|
+
removeStickerSet(slug: string): Promise<void>;
|
|
46
|
+
archiveStickerSet(slug: string): Promise<void>;
|
|
47
|
+
unarchiveStickerSet(slug: string): Promise<void>;
|
|
48
|
+
getAddedStickerSets(): Promise<import("../3_types.js").StickerSetP[]>;
|
|
44
49
|
}
|
|
45
50
|
export {};
|
|
46
51
|
//# sourceMappingURL=3_sticker_set_manager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"3_sticker_set_manager.d.ts","sourceRoot":"","sources":["../../src/client/3_sticker_set_manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,OAAO,
|
|
1
|
+
{"version":3,"file":"3_sticker_set_manager.d.ts","sourceRoot":"","sources":["../../src/client/3_sticker_set_manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,OAAO,EAAgE,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AACjI,OAAO,KAAK,EAAiB,4BAA4B,EAAE,sBAAsB,EAAE,gCAAgC,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAEzK,OAAO,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,UAAU,CAAE,SAAQ,EAAE;IACpB,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,qBAAa,iBAAiB;;gBAGhB,CAAC,EAAE,CAAC;IA2DV,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,MAAM,CAAC,EAAE,sBAAsB;IAmCtG,mBAAmB,CAAC,IAAI,EAAE,MAAM;IAKhC,qBAAqB,CAAC,IAAI,EAAE,MAAM;IAKlC,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,4BAA4B;IAiCjG,2BAA2B,CAAC,MAAM,EAAE,MAAM;IAO1C,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAIjD,0BAA0B,CAAC,oBAAoB,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,gCAAgC;IAa5H,gBAAgB,CAAC,IAAI,EAAE,MAAM;IAK7B,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAK9C,iCAAiC,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAIlE,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,4BAA4B;IAWjG,mCAAmC,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM;IAKvE,aAAa,CAAC,IAAI,EAAE,MAAM;IAM1B,iBAAiB,CAAC,KAAK,EAAE,MAAM;IAY/B,aAAa,CAAC,IAAI,EAAE,MAAM;IAK1B,gBAAgB,CAAC,IAAI,EAAE,MAAM;IAQ7B,iBAAiB,CAAC,IAAI,EAAE,MAAM;IAK9B,mBAAmB,CAAC,IAAI,EAAE,MAAM;IAKhC,mBAAmB;CAI1B"}
|
|
@@ -17,10 +17,11 @@
|
|
|
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
|
+
var _a;
|
|
20
21
|
import { contentType, unreachable } from "../0_deps.js";
|
|
21
22
|
import { InputError } from "../0_errors.js";
|
|
22
23
|
import { Api } from "../2_tl.js";
|
|
23
|
-
import { constructStickerSet, deserializeFileId } from "../3_types.js";
|
|
24
|
+
import { constructStickerSet, constructStickerSetP, deserializeFileId } from "../3_types.js";
|
|
24
25
|
import { checkStickerName } from "./0_utilities.js";
|
|
25
26
|
export class StickerSetManager {
|
|
26
27
|
#c;
|
|
@@ -82,7 +83,7 @@ export class StickerSetManager {
|
|
|
82
83
|
};
|
|
83
84
|
}
|
|
84
85
|
async createStickerSet(name, slug, stickers, params) {
|
|
85
|
-
slug =
|
|
86
|
+
slug = _a.#getSlug(slug);
|
|
86
87
|
if (this.#c.storage.isBot && !params?.userId) {
|
|
87
88
|
throw new InputError("The parameter userId is required.");
|
|
88
89
|
}
|
|
@@ -111,7 +112,7 @@ export class StickerSetManager {
|
|
|
111
112
|
return constructStickerSet(result);
|
|
112
113
|
}
|
|
113
114
|
async checkStickerSetSlug(slug) {
|
|
114
|
-
slug =
|
|
115
|
+
slug = _a.#getSlug(slug);
|
|
115
116
|
return await this.#c.invoke({ _: "stickers.checkShortName", short_name: slug });
|
|
116
117
|
}
|
|
117
118
|
async suggestStickerSetSlug(name) {
|
|
@@ -119,7 +120,7 @@ export class StickerSetManager {
|
|
|
119
120
|
return result.short_name;
|
|
120
121
|
}
|
|
121
122
|
async addStickerToStickerSet(slug, sticker, params) {
|
|
122
|
-
slug =
|
|
123
|
+
slug = _a.#getSlug(slug);
|
|
123
124
|
if (this.#c.storage.isBot && !params?.userId) {
|
|
124
125
|
throw new InputError("The parameter userId is required.");
|
|
125
126
|
}
|
|
@@ -166,18 +167,18 @@ export class StickerSetManager {
|
|
|
166
167
|
await this.#c.invoke({ _: "stickers.replaceSticker", sticker, new_sticker });
|
|
167
168
|
}
|
|
168
169
|
async deleteStickerSet(slug) {
|
|
169
|
-
slug =
|
|
170
|
+
slug = _a.#getSlug(slug);
|
|
170
171
|
await this.#c.invoke({ _: "stickers.deleteStickerSet", stickerset: { _: "inputStickerSetShortName", short_name: slug } });
|
|
171
172
|
}
|
|
172
173
|
async setStickerSetTitle(slug, title) {
|
|
173
|
-
slug =
|
|
174
|
+
slug = _a.#getSlug(slug);
|
|
174
175
|
await this.#c.invoke({ _: "stickers.renameStickerSet", stickerset: { _: "inputStickerSetShortName", short_name: slug }, title });
|
|
175
176
|
}
|
|
176
177
|
async changeStickerPositionInStickerSet(fileId, position) {
|
|
177
178
|
await this.#c.invoke({ _: "stickers.changeStickerPosition", sticker: this.#getStickerInputDocument(fileId), position });
|
|
178
179
|
}
|
|
179
180
|
async setStickerSetThumbnail(slug, thumbnail, params) {
|
|
180
|
-
slug =
|
|
181
|
+
slug = _a.#getSlug(slug);
|
|
181
182
|
if (this.#c.storage.isBot && !params?.userId) {
|
|
182
183
|
throw new InputError("The parameter userId is required.");
|
|
183
184
|
}
|
|
@@ -186,11 +187,11 @@ export class StickerSetManager {
|
|
|
186
187
|
await this.#c.invoke({ _: "stickers.setStickerSetThumb", stickerset: { _: "inputStickerSetShortName", short_name: slug }, thumb });
|
|
187
188
|
}
|
|
188
189
|
async setCustomEmojiAsStickerSetThumbnail(slug, customEmojiId) {
|
|
189
|
-
slug =
|
|
190
|
+
slug = _a.#getSlug(slug);
|
|
190
191
|
await this.#c.invoke({ _: "stickers.setStickerSetThumb", stickerset: { _: "inputStickerSetShortName", short_name: slug }, thumb_document_id: BigInt(customEmojiId) });
|
|
191
192
|
}
|
|
192
193
|
async getStickerSet(slug) {
|
|
193
|
-
slug =
|
|
194
|
+
slug = _a.#getSlug(slug);
|
|
194
195
|
const result = await this.#c.invoke({ _: "messages.getStickerSet", hash: 0, stickerset: { _: "inputStickerSetShortName", short_name: slug } });
|
|
195
196
|
return constructStickerSet(result);
|
|
196
197
|
}
|
|
@@ -198,4 +199,34 @@ export class StickerSetManager {
|
|
|
198
199
|
const result = await this.#c.invoke({ _: "messages.getStickerSet", hash: 0, stickerset: { _: "inputStickerSetDice", emoticon: emoji } });
|
|
199
200
|
return constructStickerSet(result);
|
|
200
201
|
}
|
|
202
|
+
async #installStickerSet(slug, archived) {
|
|
203
|
+
slug = _a.#getSlug(slug);
|
|
204
|
+
const short_name = slug;
|
|
205
|
+
const stickerset = { _: "inputStickerSetShortName", short_name };
|
|
206
|
+
await this.#c.invoke({ _: "messages.installStickerSet", stickerset, archived });
|
|
207
|
+
}
|
|
208
|
+
async addStickerSet(slug) {
|
|
209
|
+
this.#c.storage.assertUser("addStickerSet");
|
|
210
|
+
await this.#installStickerSet(slug, false);
|
|
211
|
+
}
|
|
212
|
+
async removeStickerSet(slug) {
|
|
213
|
+
this.#c.storage.assertUser("removeStickerSet");
|
|
214
|
+
slug = _a.#getSlug(slug);
|
|
215
|
+
const short_name = slug;
|
|
216
|
+
const stickerset = { _: "inputStickerSetShortName", short_name };
|
|
217
|
+
await this.#c.invoke({ _: "messages.uninstallStickerSet", stickerset });
|
|
218
|
+
}
|
|
219
|
+
async archiveStickerSet(slug) {
|
|
220
|
+
this.#c.storage.assertUser("archiveStickerSet");
|
|
221
|
+
await this.#installStickerSet(slug, true);
|
|
222
|
+
}
|
|
223
|
+
async unarchiveStickerSet(slug) {
|
|
224
|
+
this.#c.storage.assertUser("unarchiveStickerSet");
|
|
225
|
+
await this.#installStickerSet(slug, true);
|
|
226
|
+
}
|
|
227
|
+
async getAddedStickerSets() {
|
|
228
|
+
const result = Api.as("messages.allStickers", await this.#c.invoke({ _: "messages.getAllStickers", hash: 0n }));
|
|
229
|
+
return result.sets.map(constructStickerSetP);
|
|
230
|
+
}
|
|
201
231
|
}
|
|
232
|
+
_a = StickerSetManager;
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import { Api } from "../2_tl.js";
|
|
21
|
-
import { type AvailableReactions, type ChatP, type SlowModeDuration } from "../3_types.js";
|
|
21
|
+
import { type AvailableReactions, type ChatJoinResult, type ChatP, type SlowModeDuration } from "../3_types.js";
|
|
22
22
|
import { type FileSource, type ID, type ReportReason, type Update } from "../3_types.js";
|
|
23
|
-
import type { AddChatMemberParams, ApproveJoinRequestsParams, BanChatMemberParams, CreateInviteLinkParams, DeclineJoinRequestsParams, EnableSignaturesParams, GetCreatedInviteLinksParams, GetJoinRequestsParams, MarkAllMentionsAsReadParams, PromoteChatMemberParams, ReportChatParams, SetChatMemberRightsParams, SetChatMemberTagParams, SetChatPhotoParams } from "./0_params.js";
|
|
23
|
+
import type { AddChatMemberParams, ApproveJoinRequestsParams, BanChatMemberParams, BoostChatParams, CreateInviteLinkParams, DeclineJoinRequestsParams, EnableSignaturesParams, GetAdministeredChatsParams, GetCreatedInviteLinksParams, GetJoinRequestsParams, GetRecentActionsParams, MarkAllMentionsAsReadParams, PromoteChatMemberParams, ReportChatParams, SetChatMemberRightsParams, SetChatMemberTagParams, SetChatPhotoParams } from "./0_params.js";
|
|
24
24
|
import type { UpdateProcessor } from "./0_update_processor.js";
|
|
25
25
|
import type { C as C_ } from "./1_types.js";
|
|
26
26
|
import type { FileManager } from "./2_file_manager.js";
|
|
@@ -43,7 +43,8 @@ export declare class ChatManager implements UpdateProcessor<ChatManagerUpdate, t
|
|
|
43
43
|
getJoinRequests(chatId: ID, params?: GetJoinRequestsParams): Promise<import("../3_types.js").JoinRequest[]>;
|
|
44
44
|
createInviteLink(chatId: ID, params?: CreateInviteLinkParams): Promise<import("../3_types.js").InviteLink>;
|
|
45
45
|
getCreatedInviteLinks(chatId: ID, params?: GetCreatedInviteLinksParams): Promise<import("../3_types.js").InviteLink[]>;
|
|
46
|
-
joinChat(chatId: ID): Promise<
|
|
46
|
+
joinChat(chatId: ID): Promise<ChatJoinResult>;
|
|
47
|
+
joinChatByInviteLink(inviteLink: string): Promise<ChatJoinResult>;
|
|
47
48
|
leaveChat(chatId: ID): Promise<void>;
|
|
48
49
|
banChatMember(chatId: ID, memberId: ID, params?: BanChatMemberParams): Promise<void>;
|
|
49
50
|
unbanChatMember(chatId: ID, memberId: ID): Promise<void>;
|
|
@@ -89,6 +90,11 @@ export declare class ChatManager implements UpdateProcessor<ChatManagerUpdate, t
|
|
|
89
90
|
markChatAsUnread(chatId: ID): Promise<void>;
|
|
90
91
|
markChatAsRead(chatId: ID): Promise<void>;
|
|
91
92
|
markAllMentionsAsRead(chatId: ID, params?: MarkAllMentionsAsReadParams): Promise<void>;
|
|
93
|
+
getAdministeredChats(params?: GetAdministeredChatsParams): Promise<ChatP[]>;
|
|
94
|
+
getRecentActions(chatId: ID, params?: GetRecentActionsParams): Promise<import("../3_types.js").RecentActionsEntry[]>;
|
|
95
|
+
deleteRevokedInviteLinks(chatId: ID, userId: ID): Promise<void>;
|
|
96
|
+
boostChat(chatId: ID, params?: BoostChatParams): Promise<void>;
|
|
97
|
+
resolveInviteLink(inviteLink: string): Promise<ChatP | import("../3_types.js").ResolvedInviteLink>;
|
|
92
98
|
}
|
|
93
99
|
export {};
|
|
94
100
|
//# sourceMappingURL=4_chat_manager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4_chat_manager.d.ts","sourceRoot":"","sources":["../../src/client/4_chat_manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,KAAK,kBAAkB,EAAmE,KAAK,KAAK,
|
|
1
|
+
{"version":3,"file":"4_chat_manager.d.ts","sourceRoot":"","sources":["../../src/client/4_chat_manager.ts"],"names":[],"mappings":"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"}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
import { unreachable } from "../0_deps.js";
|
|
21
21
|
import { InputError } from "../0_errors.js";
|
|
22
22
|
import { Api } from "../2_tl.js";
|
|
23
|
-
import { availableReactionsToTlObject, chatAdministratorRightsToTlObject, constructChatMemberUpdated, constructChatP, constructFailedInvitation, constructInviteLink, constructJoinRequest, constructJoinRequest2, reportReasonToTlObject, slowModeDurationToSeconds } from "../3_types.js";
|
|
23
|
+
import { availableReactionsToTlObject, chatAdministratorRightsToTlObject, constructChatJoinResult, constructChatMemberUpdated, constructChatP, constructFailedInvitation, constructInviteLink, constructJoinRequest, constructJoinRequest2, constructRecentActionsEntry, constructResolvedInviteLink, reportReasonToTlObject, slowModeDurationToSeconds } from "../3_types.js";
|
|
24
24
|
import { chatMemberRightsToTlObject } from "../3_types.js";
|
|
25
25
|
import { checkPassword } from "./0_password.js";
|
|
26
26
|
import { canBeInputChannel, canBeInputUser, getLimit, toInputChannel, toInputUser } from "./0_utilities.js";
|
|
@@ -132,15 +132,23 @@ export class ChatManager {
|
|
|
132
132
|
throw new InputError("Cannot join private chats.");
|
|
133
133
|
}
|
|
134
134
|
else if (canBeInputChannel(peer)) {
|
|
135
|
-
await this.#c.invoke({ _: "channels.joinChannel", channel: toInputChannel(peer) });
|
|
135
|
+
const result = await this.#c.invoke({ _: "channels.joinChannel", channel: toInputChannel(peer) });
|
|
136
|
+
return constructChatJoinResult(result, this.#c.getPeer);
|
|
136
137
|
}
|
|
137
138
|
else if (Api.is("inputPeerChat", peer)) {
|
|
138
139
|
await this.#c.invoke({ _: "messages.addChatUser", chat_id: peer.chat_id, user_id: { _: "inputUserSelf" }, fwd_limit: 0 }); // TODO: use potential high-level method for adding participants to chats
|
|
140
|
+
return { type: "joined" };
|
|
139
141
|
}
|
|
140
142
|
else {
|
|
141
143
|
unreachable();
|
|
142
144
|
}
|
|
143
145
|
}
|
|
146
|
+
async joinChatByInviteLink(inviteLink) {
|
|
147
|
+
this.#c.storage.assertUser("joinChatByInviteLink");
|
|
148
|
+
const hash = ChatManager.#getInviteLinkHash(inviteLink);
|
|
149
|
+
const result = await this.#c.invoke({ _: "messages.importChatInvite", hash });
|
|
150
|
+
return constructChatJoinResult(result, this.#c.getPeer);
|
|
151
|
+
}
|
|
144
152
|
async leaveChat(chatId) {
|
|
145
153
|
const peer = await this.#c.getInputPeer(chatId);
|
|
146
154
|
if (canBeInputUser(peer)) {
|
|
@@ -505,7 +513,7 @@ export class ChatManager {
|
|
|
505
513
|
const peer = await this.#c.getInputPeer(chatId);
|
|
506
514
|
const reason = reportReasonToTlObject(reason_);
|
|
507
515
|
const message = params?.text ?? "";
|
|
508
|
-
this.#c.invoke({ _: "account.reportPeer", peer, reason, message });
|
|
516
|
+
await this.#c.invoke({ _: "account.reportPeer", peer, reason, message });
|
|
509
517
|
}
|
|
510
518
|
async #setIsChatUnread(chatId, isUnread) {
|
|
511
519
|
const peer = await this.#c.getInputPeer(chatId);
|
|
@@ -525,4 +533,95 @@ export class ChatManager {
|
|
|
525
533
|
const top_msg_id = params?.topicId;
|
|
526
534
|
await this.#c.invoke({ _: "messages.readMentions", peer, top_msg_id });
|
|
527
535
|
}
|
|
536
|
+
async getAdministeredChats(params) {
|
|
537
|
+
this.#c.storage.assertUser("getAdministeredChats");
|
|
538
|
+
const for_personal = params?.isForPersonalChannel || undefined;
|
|
539
|
+
const result = await this.#c.invoke({ _: "channels.getAdminedPublicChannels", for_personal });
|
|
540
|
+
return result.chats.map(constructChatP);
|
|
541
|
+
}
|
|
542
|
+
async getRecentActions(chatId, params) {
|
|
543
|
+
this.#c.storage.assertUser("getRecentActions");
|
|
544
|
+
const channel = await this.#c.getInputChannel(chatId);
|
|
545
|
+
const limit = getLimit(params?.limit);
|
|
546
|
+
const events_filter = {
|
|
547
|
+
_: "channelAdminLogEventsFilter",
|
|
548
|
+
ban: params?.isRestrict || undefined,
|
|
549
|
+
delete: params?.isDelete || undefined,
|
|
550
|
+
demote: params?.isRestrict || undefined,
|
|
551
|
+
edit_rank: params?.isMemberTag || undefined,
|
|
552
|
+
edit: params?.isEdit || undefined,
|
|
553
|
+
forums: params?.isForum || undefined,
|
|
554
|
+
group_call: params?.isVideoChat || undefined,
|
|
555
|
+
info: params?.isChatSettings || undefined,
|
|
556
|
+
invite: params?.isInvite || undefined,
|
|
557
|
+
invites: params?.isInvite || undefined,
|
|
558
|
+
join: params?.isJoin || undefined,
|
|
559
|
+
kick: params?.isRestrict || undefined,
|
|
560
|
+
leave: params?.isLeave || undefined,
|
|
561
|
+
pinned: params?.isPin || undefined,
|
|
562
|
+
promote: params?.isRestrict || undefined,
|
|
563
|
+
send: params?.isNewMessage || undefined,
|
|
564
|
+
settings: params?.isChatSettings || undefined,
|
|
565
|
+
unban: params?.isRestrict || undefined,
|
|
566
|
+
unkick: params?.isRestrict || undefined,
|
|
567
|
+
};
|
|
568
|
+
const max_id = params?.offsetId ? BigInt(params.offsetId) : 0n;
|
|
569
|
+
const result = await this.#c.invoke({
|
|
570
|
+
_: "channels.getAdminLog",
|
|
571
|
+
channel,
|
|
572
|
+
limit,
|
|
573
|
+
max_id,
|
|
574
|
+
min_id: 0n,
|
|
575
|
+
q: "",
|
|
576
|
+
admins: [],
|
|
577
|
+
events_filter,
|
|
578
|
+
});
|
|
579
|
+
const entries = result.events.map((v) => constructRecentActionsEntry(v, this.#c.getPeer, this.#c.messageManager.getMessage.bind(this.#c.messageManager), this.#c.fileManager.getStickerSetName.bind(this.#c.fileManager)));
|
|
580
|
+
return await Promise.all(entries);
|
|
581
|
+
}
|
|
582
|
+
async deleteRevokedInviteLinks(chatId, userId) {
|
|
583
|
+
this.#c.storage.assertUser("deleteRevokedInviteLinks");
|
|
584
|
+
const peer = await this.#c.getInputPeer(chatId);
|
|
585
|
+
const admin_id = await this.#c.getInputUser(userId);
|
|
586
|
+
await this.#c.invoke({ _: "messages.deleteRevokedExportedChatInvites", peer, admin_id });
|
|
587
|
+
}
|
|
588
|
+
async boostChat(chatId, params) {
|
|
589
|
+
this.#c.storage.assertUser("boostChat");
|
|
590
|
+
const peer = await this.#c.getInputPeer(chatId);
|
|
591
|
+
const slots = params?.slots;
|
|
592
|
+
await this.#c.invoke({ _: "premium.applyBoost", peer, slots });
|
|
593
|
+
}
|
|
594
|
+
static #getInviteLinkHash(inviteLink) {
|
|
595
|
+
try {
|
|
596
|
+
const result = new URL(inviteLink);
|
|
597
|
+
const parts = result.pathname.split("/").slice(1);
|
|
598
|
+
if (parts.length > 1) {
|
|
599
|
+
return parts[1];
|
|
600
|
+
}
|
|
601
|
+
else {
|
|
602
|
+
const part = parts[0];
|
|
603
|
+
if (part.startsWith("+")) {
|
|
604
|
+
return part.slice(1);
|
|
605
|
+
}
|
|
606
|
+
else {
|
|
607
|
+
return part;
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
catch {
|
|
612
|
+
return inviteLink;
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
async resolveInviteLink(inviteLink) {
|
|
616
|
+
this.#c.storage.assertUser("resolveInviteLink");
|
|
617
|
+
const hash = ChatManager.#getInviteLinkHash(inviteLink);
|
|
618
|
+
const result = await this.#c.invoke({ _: "messages.checkChatInvite", hash });
|
|
619
|
+
switch (result._) {
|
|
620
|
+
case "chatInviteAlready":
|
|
621
|
+
case "chatInvitePeek":
|
|
622
|
+
return constructChatP(result.chat);
|
|
623
|
+
case "chatInvite":
|
|
624
|
+
return constructResolvedInviteLink(result);
|
|
625
|
+
}
|
|
626
|
+
}
|
|
528
627
|
}
|
|
@@ -37,7 +37,7 @@ export class ChecklistManager {
|
|
|
37
37
|
}
|
|
38
38
|
async #updateChecklistInner(chatId, messageId, params) {
|
|
39
39
|
if (!params?.itemsToCheck?.length && !params?.itemsToUncheck?.length) {
|
|
40
|
-
throw new InputError("Both itemsToCheck and itemsToUncheck
|
|
40
|
+
throw new InputError("Both itemsToCheck and itemsToUncheck must not be empty.");
|
|
41
41
|
}
|
|
42
42
|
const peer = await this.#c.getInputPeer(chatId);
|
|
43
43
|
const msg_id = messageId;
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import { type Api } from "../2_tl.js";
|
|
21
|
-
import type { AlbumStoryList, AvailableReactions, BusinessConnection, CallbackQuery, Chat, ChatActionType, ChatMember, ChatP, ChatPChannel, ChatPGroup, ChatPPrivate, ChatPSupergroup, ChatSettings, ChosenInlineResult, ClaimedGifts, FailedInvitation, FileSource, GuestQuery, ID, InlineQuery, InlineQueryResult, InputChecklistItem, InputGift, InputMedia, InputPollOption, InputRichText, InputStoryContent, InviteLink, JoinRequest, Message, MessageAnimation, MessageAudio, MessageChecklist, MessageContact, MessageCounters, MessageDice, MessageDocument, MessageInvoice, MessageList, MessageLivePhoto, MessageLocation, MessagePhoto, MessagePoll, MessageReactionList, MessageRichText, MessageSticker, MessageText, MessageVenue, MessageVideo, MessageVideoNote, MessageVoice, Poll, PollVoterList, PriceTag, Reaction, ReportReason, RichText, SecretChat, SecretMessage, SlowModeDuration, StarAmount, StarTransactionList, Sticker, Story, StoryAlbum, StoryReportResult, Topic, TopicList, TopicListItem, TranslatedText, Update, User, VideoChatActive, VideoChatScheduled, VoiceTranscription } from "../3_types.js";
|
|
22
|
-
import type { AddChatMemberParams, AddContactParams, AddReactionParams, AnswerCallbackQueryParams, AnswerInlineQueryParams, AnswerPreCheckoutQueryParams, ApproveJoinRequestsParams, BanChatMemberParams, CreateInviteLinkParams, CreateStoryParams, CreateTopicParams, DeclineJoinRequestsParams, DeleteMessagesParams, EditInlineMessageCaptionParams, EditInlineMessageMediaParams, EditInlineMessageRichTextParams, EditInlineMessageTextParams, EditMessageCaptionParams, EditMessageLiveLocationParams, EditMessageMediaParams, EditMessageReplyMarkupParams, EditMessageRichTextParams, EditMessageTextParams, EditTopicParams, EnableSignaturesParams, EndSecretChatParams, ForwardMessagesParams, GetChatMembersParams, GetClaimedGiftsParams, GetCreatedInviteLinksParams, GetHistoryParams, GetJoinRequestsParams, GetPollVotersParams, GetSavedMessagesParams, GetStarTransactionsParams, GetTopicsParams, PinMessageParams, PromoteChatMemberParams, ReplyParams, ReportChatParams, ReportStoryParams, ScheduleVideoChatParams, SearchMessagesParams, SendAnimationParams, SendAudioParams, SendChecklistParams, SendContactParams, SendDiceParams, SendDocumentParams, SendGiftParams, SendInvoiceParams, SendLivePhotoParams, SendLocationParams, SendMediaGroupParams, SendMessageDraftParams, SendMessageParams, SendPhotoParams, SendPollParams, SendRichTextDraftParams, SendSecretAnimationParams, SendSecretContactParams, SendSecretDocumentParams, SendSecretLocationParams, SendSecretMessageParams, SendSecretPhotoParams, SendSecretStickerParams, SendSecretVenueParams, SendSecretVideoParams, SendStickerParams, SendVenueParams, SendVideoNoteParams, SendVideoParams, SendVoiceParams, SetChatMemberRightsParams, SetChatMemberTagParams, SetChatPhotoParams, SetReactionsParams, StartVideoChatParams, StopPollParams, SummarizeTextParams, TranslateTextParams, UpdateChecklistParams } from "./0_params.js";
|
|
21
|
+
import type { AlbumStoryList, AvailableReactions, BusinessConnection, CallbackQuery, Chat, ChatActionType, ChatJoinResult, ChatMember, ChatP, ChatPChannel, ChatPGroup, ChatPPrivate, ChatPSupergroup, ChatSettings, ChosenInlineResult, ClaimedGifts, FailedInvitation, FileSource, GuestQuery, ID, InlineQuery, InlineQueryResult, InputChecklistItem, InputGift, InputMedia, InputPollOption, InputRichText, InputStoryContent, InviteLink, JoinRequest, Message, MessageAnimation, MessageAudio, MessageChecklist, MessageContact, MessageCounters, MessageDice, MessageDocument, MessageInvoice, MessageList, MessageLivePhoto, MessageLocation, MessagePhoto, MessagePoll, MessageReactionList, MessageRichText, MessageSticker, MessageText, MessageVenue, MessageVideo, MessageVideoNote, MessageVoice, Poll, PollVoterList, PriceTag, Reaction, RecentActionsEntry, ReportReason, RichText, SecretChat, SecretMessage, SlowModeDuration, StarAmount, StarTransactionList, Sticker, Story, StoryAlbum, StoryReportResult, Topic, TopicList, TopicListItem, TranslatedText, Update, User, VideoChatActive, VideoChatScheduled, VoiceTranscription } from "../3_types.js";
|
|
22
|
+
import type { AddChatMemberParams, AddContactParams, AddReactionParams, AllowUnpaidMessagesFromUserParams, AnswerCallbackQueryParams, AnswerInlineQueryParams, AnswerPreCheckoutQueryParams, ApproveJoinRequestsParams, BanChatMemberParams, BoostChatParams, CreateInviteLinkParams, CreateStoryParams, CreateTopicParams, DeclineJoinRequestsParams, DeleteMessagesParams, DisallowUnpaidMessagesFromUserParams, EditInlineMessageCaptionParams, EditInlineMessageMediaParams, EditInlineMessageRichTextParams, EditInlineMessageTextParams, EditMessageCaptionParams, EditMessageLiveLocationParams, EditMessageMediaParams, EditMessageReplyMarkupParams, EditMessageRichTextParams, EditMessageTextParams, EditTopicParams, EnableSignaturesParams, EndSecretChatParams, ForwardMessagesParams, GetChatMembersParams, GetClaimedGiftsParams, GetCreatedInviteLinksParams, GetHistoryParams, GetJoinRequestsParams, GetPollVotersParams, GetRecentActionsParams, GetSavedMessagesParams, GetStarTransactionsParams, GetTopicsParams, PinMessageParams, PromoteChatMemberParams, ReplyParams, ReportChatParams, ReportStoryParams, ScheduleVideoChatParams, SearchMessagesParams, SendAnimationParams, SendAudioParams, SendChecklistParams, SendContactParams, SendDiceParams, SendDocumentParams, SendGiftParams, SendInvoiceParams, SendLivePhotoParams, SendLocationParams, SendMediaGroupParams, SendMessageDraftParams, SendMessageParams, SendPhotoParams, SendPollParams, SendRichTextDraftParams, SendSecretAnimationParams, SendSecretContactParams, SendSecretDocumentParams, SendSecretLocationParams, SendSecretMessageParams, SendSecretPhotoParams, SendSecretStickerParams, SendSecretVenueParams, SendSecretVideoParams, SendStickerParams, SendVenueParams, SendVideoNoteParams, SendVideoParams, SendVoiceParams, SetChatMemberRightsParams, SetChatMemberTagParams, SetChatPhotoParams, SetReactionsParams, StartVideoChatParams, StopPollParams, SummarizeTextParams, TranslateTextParams, UpdateChecklistParams } from "./0_params.js";
|
|
23
23
|
import type { ClientGeneric } from "./1_client_generic.js";
|
|
24
24
|
import { type FilterQuery, type WithChatType, type WithFilter } from "./3_filters.js";
|
|
25
25
|
export type ContextCommands = string | RegExp | (string | RegExp)[] | {
|
|
@@ -95,6 +95,8 @@ export declare class Context {
|
|
|
95
95
|
addStoryToHighlights(storyId: number): Promise<void>;
|
|
96
96
|
/** Context-aware alias for {@link Client.addToChecklist}. */
|
|
97
97
|
addToChecklist(messageId: number, items: InputChecklistItem[]): Promise<void>;
|
|
98
|
+
/** Context-aware alias for {@link Client.allowUnpaidMessagesFromUser}. */
|
|
99
|
+
allowUnpaidMessages(params?: AllowUnpaidMessagesFromUserParams): Promise<void>;
|
|
98
100
|
/** Context-aware alias for {@link Client.answerCallbackQuery}. */
|
|
99
101
|
answerCallbackQuery(params?: AnswerCallbackQueryParams): Promise<void>;
|
|
100
102
|
/** Context-aware alias for {@link Client.answerGuestQuery}. */
|
|
@@ -115,6 +117,8 @@ export declare class Context {
|
|
|
115
117
|
banSender(params?: BanChatMemberParams): Promise<void>;
|
|
116
118
|
/** Context-aware alias for {@link Client.blockUser}. */
|
|
117
119
|
blockUser(): Promise<void>;
|
|
120
|
+
/** Context-aware alias for {@link Client.boostChat}. */
|
|
121
|
+
boostChat(params?: BoostChatParams): Promise<void>;
|
|
118
122
|
/** Context-aware alias for {@link Client.checkChecklistItem}. */
|
|
119
123
|
checkChecklistItem(messageId: number, item: number): Promise<void>;
|
|
120
124
|
/** Context-aware alias for {@link Client.checkChecklistItems}. */
|
|
@@ -149,6 +153,8 @@ export declare class Context {
|
|
|
149
153
|
deleteMessage(messageId: number, params?: DeleteMessagesParams): Promise<void>;
|
|
150
154
|
/** Context-aware alias for {@link Client.deleteMessages}. */
|
|
151
155
|
deleteMessages(messageIds: number[], params?: DeleteMessagesParams): Promise<void>;
|
|
156
|
+
/** Context-aware alias for {@link Client.deleteRevokedInviteLinks}. */
|
|
157
|
+
deleteRevokedInviteLinks(userId: ID): Promise<void>;
|
|
152
158
|
/** Context-aware alias for {@link Client.deleteScheduledMessage}. */
|
|
153
159
|
deleteScheduledMessage(messageId: number): Promise<void>;
|
|
154
160
|
/** Context-aware alias for {@link Client.deleteScheduledMessages}. */
|
|
@@ -157,6 +163,8 @@ export declare class Context {
|
|
|
157
163
|
deleteStories(storyIds: number[]): Promise<void>;
|
|
158
164
|
/** Context-aware alias for {@link Client.deleteStory}. */
|
|
159
165
|
deleteStory(storyId: number): Promise<void>;
|
|
166
|
+
/** Context-aware alias for {@link Client.deleteTopic}. */
|
|
167
|
+
deleteTopic(topicId: number): Promise<void>;
|
|
160
168
|
/** Context-aware alias for {@link Client.disableAntispam}. */
|
|
161
169
|
disableAntispam(): Promise<void>;
|
|
162
170
|
/** Context-aware alias for {@link Client.disableBusinessBots}. */
|
|
@@ -173,6 +181,8 @@ export declare class Context {
|
|
|
173
181
|
disableSlowMode(): Promise<void>;
|
|
174
182
|
/** Context-aware alias for {@link Client.disableTopics}. */
|
|
175
183
|
disableTopics(): Promise<void>;
|
|
184
|
+
/** Context-aware alias for {@link Client.disallowUnpaidMessagesFromUser}. */
|
|
185
|
+
disallowUnpaidMessages(params?: DisallowUnpaidMessagesFromUserParams): Promise<void>;
|
|
176
186
|
/** Context-aware alias for {@link Client.editInlineMessageCaption}. */
|
|
177
187
|
editInlineMessageCaption(params?: EditInlineMessageCaptionParams): Promise<void>;
|
|
178
188
|
/** Context-aware alias for {@link Client.editInlineMessageLiveLocation}. */
|
|
@@ -259,6 +269,8 @@ export declare class Context {
|
|
|
259
269
|
getOnlineCount(): Promise<number>;
|
|
260
270
|
/** Context-aware alias for {@link Client.getPollVoters}. */
|
|
261
271
|
getPollVoters(messageId: number, params?: GetPollVotersParams): Promise<PollVoterList>;
|
|
272
|
+
/** Context-aware alias for {@link Client.getRecentActions}. */
|
|
273
|
+
getRecentActions(params?: GetRecentActionsParams): Promise<RecentActionsEntry[]>;
|
|
262
274
|
/** Context-aware alias for {@link Client.getRichText}. */
|
|
263
275
|
getRichText(messageId: number): Promise<RichText | null>;
|
|
264
276
|
/** Context-aware alias for {@link Client.getSavedMessages}. */
|
|
@@ -296,7 +308,7 @@ export declare class Context {
|
|
|
296
308
|
/** Context-aware alias for {@link Client.hideMemberList}. */
|
|
297
309
|
hideMemberList(): Promise<void>;
|
|
298
310
|
/** Context-aware alias for {@link Client.joinChat}. */
|
|
299
|
-
joinChat(): Promise<
|
|
311
|
+
joinChat(): Promise<ChatJoinResult>;
|
|
300
312
|
/** Context-aware alias for {@link Client.kickChatMember}. */
|
|
301
313
|
kickChatMember(memberId: ID): Promise<void>;
|
|
302
314
|
/** Context-aware alias for {@link Client.kickChatMember}. */
|
|
@@ -415,6 +427,8 @@ export declare class Context {
|
|
|
415
427
|
replyVoice(voice: FileSource, params?: Omit<SendVoiceParams, "replyTo" | "messageThreadId" | "businessConnectionId"> & ReplyParams): Promise<MessageVoice>;
|
|
416
428
|
/** Context-aware alias for {@link Client.reportChat}. */
|
|
417
429
|
reportChat(reason: ReportReason, params?: ReportChatParams): Promise<void>;
|
|
430
|
+
/** Context-aware alias for {@link Client.reportReaction}. */
|
|
431
|
+
reportReaction(messageId: number, reactionActorId: ID): Promise<void>;
|
|
418
432
|
/** Context-aware alias for {@link Client.reportStories}. */
|
|
419
433
|
reportStories(storyIds: number[], params?: ReportStoryParams): Promise<StoryReportResult>;
|
|
420
434
|
/** Context-aware alias for {@link Client.reportStory}. */
|