@mtkruto/node 0.1.118 → 0.1.121
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/0_deps.d.ts +3 -3
- package/esm/0_deps.js +3 -3
- package/esm/2_tl.d.ts +3 -3
- package/esm/2_tl.js +3 -3
- package/esm/3_errors.d.ts +509 -509
- package/esm/3_errors.js +509 -509
- package/esm/4_constants.d.ts +2 -2
- package/esm/4_constants.js +2 -2
- package/esm/4_errors.d.ts +7 -7
- package/esm/4_errors.js +6 -6
- package/esm/_dnt.shims.js +0 -1
- package/esm/client/0_password.d.ts +2 -2
- package/esm/client/0_password.js +4 -4
- package/esm/client/0_utilities.d.ts +3 -3
- package/esm/client/0_utilities.js +1 -2
- package/esm/client/2_client_plain.js +20 -20
- package/esm/client/3_types.d.ts +4 -0
- package/esm/client/4_composer.d.ts +5 -1
- package/esm/client/4_composer.js +37 -13
- package/esm/client/5_client.d.ts +24 -7
- package/esm/client/5_client.js +381 -258
- package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_strict_equals.js +1 -1
- package/esm/storage/0_storage.d.ts +5 -5
- package/esm/tl/1_tl_object.d.ts +4 -0
- package/esm/tl/1_tl_object.js +13 -4
- package/esm/tl/2_types.d.ts +11384 -6448
- package/esm/tl/2_types.js +16321 -10139
- package/esm/tl/3_functions.d.ts +6773 -2401
- package/esm/tl/3_functions.js +9440 -3368
- package/esm/tl/3_utilities.d.ts +2 -2
- package/esm/tl/3_utilities.js +4 -4
- package/esm/tl/6_message.d.ts +1 -1
- package/esm/tl/6_message.js +1 -1
- package/esm/types/0__file_id.js +1 -2
- package/esm/types/0_audio.js +1 -1
- package/esm/types/0_chat_administrator_rights.d.ts +3 -3
- package/esm/types/0_chat_administrator_rights.js +20 -20
- package/esm/types/0_chat_photo.js +8 -8
- package/esm/types/0_contact.js +4 -4
- package/esm/types/0_force_reply.d.ts +1 -1
- package/esm/types/0_location.js +4 -4
- package/esm/types/0_mask_position.d.ts +2 -2
- package/esm/types/0_message_entity.d.ts +3 -3
- package/esm/types/0_message_entity.js +8 -8
- package/esm/types/0_poll_option.d.ts +2 -2
- package/esm/types/0_reply_keyboard_remove.d.ts +1 -1
- package/esm/types/0_restriction_reason.d.ts +2 -2
- package/esm/types/0_thumbnail.js +3 -3
- package/esm/types/0_venue.js +3 -3
- package/esm/types/0_voice.js +1 -1
- package/esm/types/1_animation.js +2 -2
- package/esm/types/1_bot_command_scope.d.ts +1 -2
- package/esm/types/1_bot_command_scope.js +1 -1
- package/esm/types/1_chat.js +9 -9
- package/esm/types/1_document.js +2 -2
- package/esm/types/1_input_invoice_message_content.d.ts +1 -1
- package/esm/types/1_keyboard_button.d.ts +3 -3
- package/esm/types/1_keyboard_button.js +35 -35
- package/esm/types/1_photo.js +1 -1
- package/esm/types/1_poll.js +6 -6
- package/esm/types/1_sticker.js +3 -3
- package/esm/types/1_user.js +6 -6
- package/esm/types/1_video.js +1 -1
- package/esm/types/2_game.js +3 -3
- package/esm/types/2_inline_keyboard_button.d.ts +3 -3
- package/esm/types/2_inline_keyboard_button.js +9 -9
- package/esm/types/2_inline_query.js +8 -8
- package/esm/types/2_reply_keyboard_markup.d.ts +1 -1
- package/esm/types/2_reply_keyboard_markup.js +2 -2
- package/esm/types/3_inline_keyboard_markup.d.ts +1 -1
- package/esm/types/3_message.d.ts +4 -4
- package/esm/types/3_message.js +64 -64
- package/esm/types/4_callback_query.js +6 -6
- package/esm/types/4_reply_markup.d.ts +1 -1
- package/esm/types/5_inline_query_result.d.ts +1 -2
- package/esm/types/5_inline_query_result.js +30 -30
- package/package.json +13 -12
- package/script/0_deps.d.ts +3 -3
- package/script/0_deps.js +3 -3
- package/script/2_tl.d.ts +3 -3
- package/script/2_tl.js +5 -15
- package/script/3_errors.d.ts +509 -509
- package/script/3_errors.js +509 -509
- package/script/4_constants.d.ts +2 -2
- package/script/4_constants.js +2 -2
- package/script/4_errors.d.ts +7 -7
- package/script/4_errors.js +6 -6
- package/script/_dnt.shims.js +0 -1
- package/script/client/0_password.d.ts +2 -2
- package/script/client/0_password.js +4 -4
- package/script/client/0_utilities.d.ts +3 -3
- package/script/client/0_utilities.js +1 -2
- package/script/client/2_client_plain.js +20 -20
- package/script/client/3_types.d.ts +4 -0
- package/script/client/4_composer.d.ts +5 -1
- package/script/client/4_composer.js +37 -13
- package/script/client/5_client.d.ts +24 -7
- package/script/client/5_client.js +380 -257
- package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/_diff.js +1 -1
- package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_strict_equals.js +1 -1
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/ElementType.js +1 -1
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/mod.js +3 -3
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/helpers.js +1 -1
- package/script/storage/0_storage.d.ts +5 -5
- package/script/storage/0_utilities.js +1 -1
- package/script/tl/1_tl_object.d.ts +4 -0
- package/script/tl/1_tl_object.js +14 -5
- package/script/tl/2_types.d.ts +11384 -6448
- package/script/tl/2_types.js +18030 -11825
- package/script/tl/3_functions.d.ts +6773 -2401
- package/script/tl/3_functions.js +10051 -3994
- package/script/tl/3_utilities.d.ts +2 -2
- package/script/tl/3_utilities.js +7 -30
- package/script/tl/6_message.d.ts +1 -1
- package/script/tl/6_message.js +4 -4
- package/script/types/0__file_id.js +4 -4
- package/script/types/0_audio.js +1 -1
- package/script/types/0_chat_administrator_rights.d.ts +3 -3
- package/script/types/0_chat_administrator_rights.js +20 -20
- package/script/types/0_chat_photo.js +8 -8
- package/script/types/0_contact.js +4 -4
- package/script/types/0_force_reply.d.ts +1 -1
- package/script/types/0_location.js +4 -4
- package/script/types/0_mask_position.d.ts +2 -2
- package/script/types/0_message_entity.d.ts +3 -3
- package/script/types/0_message_entity.js +8 -8
- package/script/types/0_poll_option.d.ts +2 -2
- package/script/types/0_reply_keyboard_remove.d.ts +1 -1
- package/script/types/0_restriction_reason.d.ts +2 -2
- package/script/types/0_thumbnail.js +3 -3
- package/script/types/0_venue.js +3 -3
- package/script/types/0_voice.js +1 -1
- package/script/types/1_animation.js +2 -2
- package/script/types/1_bot_command_scope.d.ts +1 -2
- package/script/types/1_bot_command_scope.js +1 -1
- package/script/types/1_chat.js +9 -9
- package/script/types/1_document.js +2 -2
- package/script/types/1_input_invoice_message_content.d.ts +1 -1
- package/script/types/1_keyboard_button.d.ts +3 -3
- package/script/types/1_keyboard_button.js +35 -35
- package/script/types/1_photo.js +1 -1
- package/script/types/1_poll.js +6 -6
- package/script/types/1_sticker.js +3 -3
- package/script/types/1_user.js +6 -6
- package/script/types/1_video.js +1 -1
- package/script/types/2_game.js +3 -3
- package/script/types/2_inline_keyboard_button.d.ts +3 -3
- package/script/types/2_inline_keyboard_button.js +9 -9
- package/script/types/2_inline_query.js +8 -8
- package/script/types/2_reply_keyboard_markup.d.ts +1 -1
- package/script/types/2_reply_keyboard_markup.js +2 -2
- package/script/types/3_inline_keyboard_markup.d.ts +1 -1
- package/script/types/3_message.d.ts +4 -4
- package/script/types/3_message.js +64 -64
- package/script/types/4_callback_query.js +6 -6
- package/script/types/4_reply_markup.d.ts +1 -1
- package/script/types/5_inline_query_result.d.ts +1 -2
- package/script/types/5_inline_query_result.js +30 -30
- package/esm/_dnt.test_shims.d.ts +0 -10
- package/esm/client/0_password_test.d.ts +0 -1
- package/esm/client/0_utilities_test.d.ts +0 -1
- package/esm/storage/0_utilities_test.d.ts +0 -1
- package/esm/tl/0_tl_raw_reader_test.d.ts +0 -1
- package/esm/tl/0_tl_raw_writer_test.d.ts +0 -1
- package/esm/tl/1_tl_object_test.d.ts +0 -1
- package/esm/tl/2_types_test.d.ts +0 -1
- package/esm/tl/3_deserialize_test.d.ts +0 -1
- package/esm/tl/3_functions_test.d.ts +0 -1
- package/esm/tl/6_message_test.d.ts +0 -1
- package/esm/utilities/0_base64_test.d.ts +0 -1
- package/esm/utilities/0_bigint_test.d.ts +0 -1
- package/esm/utilities/0_buffer_test.d.ts +0 -1
- package/esm/utilities/0_rle_test.d.ts +0 -1
- package/script/_dnt.test_shims.d.ts +0 -10
- package/script/client/0_password_test.d.ts +0 -1
- package/script/client/0_utilities_test.d.ts +0 -1
- package/script/storage/0_utilities_test.d.ts +0 -1
- package/script/tl/0_tl_raw_reader_test.d.ts +0 -1
- package/script/tl/0_tl_raw_writer_test.d.ts +0 -1
- package/script/tl/1_tl_object_test.d.ts +0 -1
- package/script/tl/2_types_test.d.ts +0 -1
- package/script/tl/3_deserialize_test.d.ts +0 -1
- package/script/tl/3_functions_test.d.ts +0 -1
- package/script/tl/6_message_test.d.ts +0 -1
- package/script/utilities/0_base64_test.d.ts +0 -1
- package/script/utilities/0_bigint_test.d.ts +0 -1
- package/script/utilities/0_buffer_test.d.ts +0 -1
- package/script/utilities/0_rle_test.d.ts +0 -1
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/_constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/_constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/_diff.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/_diff.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/_format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/_format.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_almost_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_array_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_array_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_exists.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_exists.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_false.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_false.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_greater.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_greater.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_greater_or_equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_greater_or_equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_is_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_is_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_less.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_less.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_less_or_equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_less_or_equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_object_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_object_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_rejects.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_rejects.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_strict_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_string_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_string_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_throws.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_throws.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assertion_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assertion_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/fail.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/fail.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/unimplemented.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/unimplemented.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/unreachable.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/unreachable.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/encoding/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/encoding/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/encoding/base64.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/encoding/base64.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/fmt/colors.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/fmt/colors.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/assert_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/assert_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/glob_to_reg_exp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/glob_to_reg_exp.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/normalize_string.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/normalize_string.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/strip_trailing_separators.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_interface.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_interface.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_os.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_os.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/separator.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/separator.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/separator.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/separator.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/separator.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/separator.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/to_namespaced_path.js +0 -0
- /package/esm/tl/{5_rpc_result.d.ts → 4_rpc_result.d.ts} +0 -0
- /package/esm/tl/{5_rpc_result.js → 4_rpc_result.js} +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/_constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/_constants.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/_diff.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/_format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/_format.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_almost_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_array_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_array_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_exists.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_exists.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_false.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_false.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_greater.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_greater.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_greater_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_greater_or_equal.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_is_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_is_error.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_less.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_less.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_less_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_less_or_equal.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_match.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_match.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_object_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_object_match.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_rejects.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_rejects.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_string_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_string_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_throws.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assert_throws.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assertion_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/assertion_error.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/equal.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/fail.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/fail.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/unimplemented.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/unimplemented.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/unreachable.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/assert/unreachable.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/encoding/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/encoding/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/encoding/base64.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/encoding/base64.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/fmt/colors.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/fmt/colors.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/assert_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/assert_path.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/common.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/format.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/glob_to_reg_exp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/glob_to_reg_exp.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/normalize_string.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/normalize_string.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/strip_trailing_separators.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_common/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_interface.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_interface.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_os.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/_os.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/common.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/format.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/join.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/common.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/format.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/join.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/separator.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/separator.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/posix/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/separator.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/separator.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/common.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/format.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/join.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/separator.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/separator.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.207.0 → std@0.208.0}/path/windows/to_namespaced_path.js +0 -0
- /package/script/tl/{5_rpc_result.d.ts → 4_rpc_result.d.ts} +0 -0
- /package/script/tl/{5_rpc_result.js → 4_rpc_result.js} +0 -0
|
@@ -10,7 +10,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
11
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
12
|
};
|
|
13
|
-
var _Client_instances, _a, _Client_auth, _Client_sessionId, _Client_state, _Client_promises, _Client_toAcknowledge, _Client_updateState, _Client_publicKeys, _Client_autoStart, _Client_ignoreOutgoing, _Client_constructContext, _Client_propagateConnectionState, _Client_lastPropagatedConnectionState, _Client_storageInited, _Client_setAuth, _Client_authKeyWasCreated, _Client_connectMutex, _Client_assertUser, _Client_assertBot, _Client_fetchState, _Client_connectionInited, _Client_initConnection, _Client_lastPropagatedAuthorizationState, _Client_propagateAuthorizationState, _Client_selfId, _Client_getSelfId, _Client_receiveLoop, _Client_pingInterval, _Client_pingLoop, _Client_pingLoopStarted, _Client_autoStarted, _Client_lastMsgId, _Client_invoke, _Client_handleInvokeError, _Client_processChats, _Client_processUsers, _Client_handleUpdateQueue, _Client_processUpdatesQueue, _Client_checkChannelGap, _Client_processUpdates, _Client_setUpdateStateDate, _Client_getLocalState, _Client_recoverUpdateGap, _Client_recoverChannelUpdateGap, _Client_getChannelAccessHash, _Client_getInputPeerInner, _Client_updatesToMessages, _Client_resolveSendAs, _Client_parseText, _Client_getMessagesInner, _Client_downloadInner, _Client_lastGetMe, _Client_getMe, _Client_handleUpdate, _Client_usernameResolver, _Client_constructReplyMarkup, _Client_assertMsgHas, _Client_handle, _Client_setMyInfo, _Client_getMyInfo;
|
|
13
|
+
var _Client_instances, _a, _Client_auth, _Client_sessionId, _Client_state, _Client_promises, _Client_toAcknowledge, _Client_updateState, _Client_publicKeys, _Client_autoStart, _Client_ignoreOutgoing, _Client_prefixes, _Client_namespaceProxies, _Client_constructContext, _Client_propagateConnectionState, _Client_lastPropagatedConnectionState, _Client_storageInited, _Client_setAuth, _Client_authKeyWasCreated, _Client_connectMutex, _Client_assertUser, _Client_assertBot, _Client_fetchState, _Client_connectionInited, _Client_initConnection, _Client_lastPropagatedAuthorizationState, _Client_propagateAuthorizationState, _Client_selfId, _Client_getSelfId, _Client_receiveLoop, _Client_pingInterval, _Client_pingLoop, _Client_pingLoopStarted, _Client_autoStarted, _Client_lastMsgId, _Client_invoke, _Client_handleInvokeError, _Client_processChats, _Client_processUsers, _Client_handleUpdateQueue, _Client_processUpdatesQueue, _Client_checkChannelGap, _Client_processUpdates, _Client_setUpdateStateDate, _Client_setUpdatePts, _Client_getLocalState, _Client_recoverUpdateGap, _Client_recoverChannelUpdateGap, _Client_getChannelAccessHash, _Client_getInputPeerInner, _Client_updatesToMessages, _Client_resolveSendAs, _Client_parseText, _Client_getMessagesInner, _Client_downloadInner, _Client_lastGetMe, _Client_getMe, _Client_handleUpdate, _Client_usernameResolver, _Client_constructReplyMarkup, _Client_assertMsgHas, _Client_handle, _Client_setMyInfo, _Client_getMyInfo;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.Client = exports.ConnectionError = exports.restartAuth = exports.skipInvoke = exports.handleMigrationError = void 0;
|
|
16
16
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
@@ -37,6 +37,7 @@ const getEntity = Symbol();
|
|
|
37
37
|
const getStickerSetName = Symbol();
|
|
38
38
|
exports.handleMigrationError = Symbol();
|
|
39
39
|
const getMessageWithReply = Symbol();
|
|
40
|
+
const functionNamespaces = Object.entries(_2_tl_js_1.functions).filter(([, v]) => !(v instanceof Function)).map(([k]) => k);
|
|
40
41
|
function skipInvoke() {
|
|
41
42
|
return (_ctx, next) => next();
|
|
42
43
|
}
|
|
@@ -125,6 +126,63 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
125
126
|
_Client_publicKeys.set(this, void 0);
|
|
126
127
|
_Client_autoStart.set(this, void 0);
|
|
127
128
|
_Client_ignoreOutgoing.set(this, void 0);
|
|
129
|
+
_Client_prefixes.set(this, void 0);
|
|
130
|
+
_Client_namespaceProxies.set(this, (() => {
|
|
131
|
+
// deno-lint-ignore no-explicit-any
|
|
132
|
+
const proxies = {};
|
|
133
|
+
for (const name of functionNamespaces) {
|
|
134
|
+
const ns = _2_tl_js_1.functions[name];
|
|
135
|
+
proxies[name] = new Proxy({}, {
|
|
136
|
+
get: (_, key) => {
|
|
137
|
+
if (key in ns) {
|
|
138
|
+
// deno-lint-ignore no-explicit-any
|
|
139
|
+
const func = ns[key];
|
|
140
|
+
if (func instanceof Function) {
|
|
141
|
+
// deno-lint-ignore no-explicit-any
|
|
142
|
+
return (params) => {
|
|
143
|
+
// deno-lint-ignore ban-ts-comment
|
|
144
|
+
// @ts-ignore
|
|
145
|
+
return this.invoke(new func(params));
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
set() {
|
|
154
|
+
return true;
|
|
155
|
+
},
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
return proxies;
|
|
159
|
+
})());
|
|
160
|
+
Object.defineProperty(this, "api", {
|
|
161
|
+
enumerable: true,
|
|
162
|
+
configurable: true,
|
|
163
|
+
writable: true,
|
|
164
|
+
value: new Proxy({}, {
|
|
165
|
+
get: (_, key) => {
|
|
166
|
+
if (key in _2_tl_js_1.functions) {
|
|
167
|
+
const func = _2_tl_js_1.functions[key];
|
|
168
|
+
if (func instanceof Function) {
|
|
169
|
+
// deno-lint-ignore no-explicit-any
|
|
170
|
+
return (params) => {
|
|
171
|
+
// deno-lint-ignore ban-ts-comment
|
|
172
|
+
// @ts-ignore
|
|
173
|
+
return this.invoke(new func(params));
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
return __classPrivateFieldGet(this, _Client_namespaceProxies, "f")[key];
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
set() {
|
|
182
|
+
return true;
|
|
183
|
+
},
|
|
184
|
+
})
|
|
185
|
+
});
|
|
128
186
|
_Client_constructContext.set(this, async (update) => {
|
|
129
187
|
const msg = update.message ?? update.editedMessage ?? update.callbackQuery?.message;
|
|
130
188
|
const mustGetMsg = () => {
|
|
@@ -287,7 +345,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
287
345
|
_Client_lastGetMe.set(this, null);
|
|
288
346
|
_Client_usernameResolver.set(this, async (v) => {
|
|
289
347
|
const inputPeer = await this.getInputPeer(v).then((v) => v[_2_tl_js_1.as](_2_tl_js_1.types.InputPeerUser));
|
|
290
|
-
return new _2_tl_js_1.types.InputUser(
|
|
348
|
+
return new _2_tl_js_1.types.InputUser(inputPeer);
|
|
291
349
|
});
|
|
292
350
|
//#region Composer
|
|
293
351
|
_Client_handle.set(this, _4_composer_js_1.skip);
|
|
@@ -302,6 +360,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
302
360
|
__classPrivateFieldSet(this, _Client_publicKeys, params?.publicKeys, "f");
|
|
303
361
|
__classPrivateFieldSet(this, _Client_autoStart, params?.autoStart ?? true, "f");
|
|
304
362
|
__classPrivateFieldSet(this, _Client_ignoreOutgoing, params?.ignoreOutgoing ?? null, "f");
|
|
363
|
+
__classPrivateFieldSet(this, _Client_prefixes, params?.prefixes, "f");
|
|
305
364
|
if (params?.defaultHandlers ?? true) {
|
|
306
365
|
this.on("connectionState", ({ connectionState }, next) => {
|
|
307
366
|
(0, _1_utilities_js_1.drop)((async () => {
|
|
@@ -411,7 +470,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
411
470
|
release();
|
|
412
471
|
}
|
|
413
472
|
}
|
|
414
|
-
async [(_Client_auth = new WeakMap(), _Client_sessionId = new WeakMap(), _Client_state = new WeakMap(), _Client_promises = new WeakMap(), _Client_toAcknowledge = new WeakMap(), _Client_updateState = new WeakMap(), _Client_publicKeys = new WeakMap(), _Client_autoStart = new WeakMap(), _Client_ignoreOutgoing = new WeakMap(), _Client_constructContext = new WeakMap(), _Client_lastPropagatedConnectionState = new WeakMap(), _Client_storageInited = new WeakMap(), _Client_authKeyWasCreated = new WeakMap(), _Client_connectMutex = new WeakMap(), _Client_connectionInited = new WeakMap(), _Client_lastPropagatedAuthorizationState = new WeakMap(), _Client_selfId = new WeakMap(), _Client_pingInterval = new WeakMap(), _Client_pingLoopStarted = new WeakMap(), _Client_autoStarted = new WeakMap(), _Client_lastMsgId = new WeakMap(), _Client_handleInvokeError = new WeakMap(), _Client_handleUpdateQueue = new WeakMap(), _Client_processUpdatesQueue = new WeakMap(), _Client_lastGetMe = new WeakMap(), _Client_usernameResolver = new WeakMap(), _Client_handle = new WeakMap(), _Client_instances = new WeakSet(), _Client_propagateConnectionState = function _Client_propagateConnectionState(connectionState) {
|
|
473
|
+
async [(_Client_auth = new WeakMap(), _Client_sessionId = new WeakMap(), _Client_state = new WeakMap(), _Client_promises = new WeakMap(), _Client_toAcknowledge = new WeakMap(), _Client_updateState = new WeakMap(), _Client_publicKeys = new WeakMap(), _Client_autoStart = new WeakMap(), _Client_ignoreOutgoing = new WeakMap(), _Client_prefixes = new WeakMap(), _Client_namespaceProxies = new WeakMap(), _Client_constructContext = new WeakMap(), _Client_lastPropagatedConnectionState = new WeakMap(), _Client_storageInited = new WeakMap(), _Client_authKeyWasCreated = new WeakMap(), _Client_connectMutex = new WeakMap(), _Client_connectionInited = new WeakMap(), _Client_lastPropagatedAuthorizationState = new WeakMap(), _Client_selfId = new WeakMap(), _Client_pingInterval = new WeakMap(), _Client_pingLoopStarted = new WeakMap(), _Client_autoStarted = new WeakMap(), _Client_lastMsgId = new WeakMap(), _Client_handleInvokeError = new WeakMap(), _Client_handleUpdateQueue = new WeakMap(), _Client_processUpdatesQueue = new WeakMap(), _Client_lastGetMe = new WeakMap(), _Client_usernameResolver = new WeakMap(), _Client_handle = new WeakMap(), _Client_instances = new WeakSet(), _Client_propagateConnectionState = function _Client_propagateConnectionState(connectionState) {
|
|
415
474
|
__classPrivateFieldGet(this, _Client_handleUpdateQueue, "f").add(async () => {
|
|
416
475
|
await __classPrivateFieldGet(this, _Client_handle, "f").call(this, await __classPrivateFieldGet(this, _Client_constructContext, "f").call(this, { connectionState }), _0_utilities_js_1.resolve);
|
|
417
476
|
});
|
|
@@ -428,7 +487,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
428
487
|
throw new Error(`${source}: not a bot client`);
|
|
429
488
|
}
|
|
430
489
|
}, _Client_fetchState = async function _Client_fetchState(source) {
|
|
431
|
-
const state = await this.invoke(new _2_tl_js_1.functions.
|
|
490
|
+
const state = await this.invoke(new _2_tl_js_1.functions.updates.getState());
|
|
432
491
|
__classPrivateFieldSet(this, _Client_updateState, state, "f");
|
|
433
492
|
d("state fetched [%s]", source);
|
|
434
493
|
}, exports.handleMigrationError)](err) {
|
|
@@ -476,7 +535,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
476
535
|
params = { phone: () => (0, _1_utilities_js_1.mustPrompt)("Phone number:"), code: () => (0, _1_utilities_js_1.mustPrompt)("Verification code:"), password: () => (0, _1_utilities_js_1.mustPrompt)("Password:") };
|
|
477
536
|
}
|
|
478
537
|
}
|
|
479
|
-
dAuth("authorizing with %s", typeof params === "string" ? "bot token" : params instanceof _2_tl_js_1.types.
|
|
538
|
+
dAuth("authorizing with %s", typeof params === "string" ? "bot token" : params instanceof _2_tl_js_1.types.auth.ExportedAuthorization ? "exported authorization" : "AuthorizeUserParams");
|
|
480
539
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initConnection).call(this);
|
|
481
540
|
try {
|
|
482
541
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_fetchState).call(this, "authorize");
|
|
@@ -492,8 +551,8 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
492
551
|
if (typeof params === "string") {
|
|
493
552
|
while (true) {
|
|
494
553
|
try {
|
|
495
|
-
const auth = await this.invoke(new _2_tl_js_1.functions.
|
|
496
|
-
__classPrivateFieldSet(this, _Client_selfId, Number(auth[_2_tl_js_1.as](_2_tl_js_1.types.
|
|
554
|
+
const auth = await this.invoke(new _2_tl_js_1.functions.auth.importBotAuthorization({ api_id: this.apiId, api_hash: this.apiHash, bot_auth_token: params, flags: 0 }));
|
|
555
|
+
__classPrivateFieldSet(this, _Client_selfId, Number(auth[_2_tl_js_1.as](_2_tl_js_1.types.auth.Authorization).user.id), "f");
|
|
497
556
|
await this.storage.setAccountType("bot");
|
|
498
557
|
break;
|
|
499
558
|
}
|
|
@@ -513,8 +572,8 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
513
572
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_fetchState).call(this, "authorize");
|
|
514
573
|
return;
|
|
515
574
|
}
|
|
516
|
-
if (params instanceof _2_tl_js_1.types.
|
|
517
|
-
await this.invoke(new _2_tl_js_1.functions.
|
|
575
|
+
if (params instanceof _2_tl_js_1.types.auth.ExportedAuthorization) {
|
|
576
|
+
await this.invoke(new _2_tl_js_1.functions.auth.importAuthorization({ id: params.id, bytes: params.bytes }));
|
|
518
577
|
dAuth("authorization imported");
|
|
519
578
|
return;
|
|
520
579
|
}
|
|
@@ -525,12 +584,12 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
525
584
|
while (true) {
|
|
526
585
|
try {
|
|
527
586
|
phone = typeof params.phone === "string" ? params.phone : await params.phone();
|
|
528
|
-
const sendCode = () => this.invoke(new _2_tl_js_1.functions.
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
587
|
+
const sendCode = () => this.invoke(new _2_tl_js_1.functions.auth.sendCode({
|
|
588
|
+
phone_number: phone,
|
|
589
|
+
api_id: this.apiId,
|
|
590
|
+
api_hash: this.apiHash,
|
|
532
591
|
settings: new _2_tl_js_1.types.CodeSettings(),
|
|
533
|
-
})).then((v) => v[_2_tl_js_1.as](_2_tl_js_1.types.
|
|
592
|
+
})).then((v) => v[_2_tl_js_1.as](_2_tl_js_1.types.auth.SentCode));
|
|
534
593
|
try {
|
|
535
594
|
sentCode = await sendCode();
|
|
536
595
|
}
|
|
@@ -560,12 +619,12 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
560
619
|
code: while (true) {
|
|
561
620
|
const code = typeof params.code === "string" ? params.code : await params.code();
|
|
562
621
|
try {
|
|
563
|
-
const auth = await this.invoke(new _2_tl_js_1.functions.
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
622
|
+
const auth = await this.invoke(new _2_tl_js_1.functions.auth.signIn({
|
|
623
|
+
phone_number: phone,
|
|
624
|
+
phone_code: code,
|
|
625
|
+
phone_code_hash: sentCode.phone_code_hash,
|
|
567
626
|
}));
|
|
568
|
-
__classPrivateFieldSet(this, _Client_selfId, Number(auth[_2_tl_js_1.as](_2_tl_js_1.types.
|
|
627
|
+
__classPrivateFieldSet(this, _Client_selfId, Number(auth[_2_tl_js_1.as](_2_tl_js_1.types.auth.Authorization).user.id), "f");
|
|
569
628
|
await this.storage.setAccountType("user");
|
|
570
629
|
dAuth("authorized as user");
|
|
571
630
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateAuthorizationState).call(this, true);
|
|
@@ -573,7 +632,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
573
632
|
return;
|
|
574
633
|
}
|
|
575
634
|
catch (err_) {
|
|
576
|
-
if (err_ instanceof _2_tl_js_1.types.
|
|
635
|
+
if (err_ instanceof _2_tl_js_1.types.Rpc_error && err_.error_message == "PHONE_CODE_INVALID") {
|
|
577
636
|
continue code;
|
|
578
637
|
}
|
|
579
638
|
else {
|
|
@@ -586,20 +645,20 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
586
645
|
throw err;
|
|
587
646
|
}
|
|
588
647
|
password: while (true) {
|
|
589
|
-
const ap = await this.invoke(new _2_tl_js_1.functions.
|
|
590
|
-
if (!(ap.
|
|
591
|
-
throw new Error(`Handling ${ap.
|
|
648
|
+
const ap = await this.invoke(new _2_tl_js_1.functions.account.getPassword());
|
|
649
|
+
if (!(ap.current_algo instanceof _2_tl_js_1.types.PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow)) {
|
|
650
|
+
throw new Error(`Handling ${ap.current_algo?.[_2_tl_js_1.name]} not implemented`);
|
|
592
651
|
}
|
|
593
652
|
try {
|
|
594
653
|
const password = typeof params.password === "string" ? params.password : await params.password(ap.hint ?? null);
|
|
595
654
|
const input = await (0, _0_password_js_1.checkPassword)(password, ap);
|
|
596
|
-
const auth = await this.invoke(new _2_tl_js_1.functions.
|
|
597
|
-
__classPrivateFieldSet(this, _Client_selfId, Number(auth[_2_tl_js_1.as](_2_tl_js_1.types.
|
|
655
|
+
const auth = await this.invoke(new _2_tl_js_1.functions.auth.checkPassword({ password: input }));
|
|
656
|
+
__classPrivateFieldSet(this, _Client_selfId, Number(auth[_2_tl_js_1.as](_2_tl_js_1.types.auth.Authorization).user.id), "f");
|
|
598
657
|
await this.storage.setAccountType("user");
|
|
599
658
|
dAuth("authorized as user");
|
|
600
659
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateAuthorizationState).call(this, true);
|
|
601
660
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_fetchState).call(this, "authorize");
|
|
602
|
-
|
|
661
|
+
return;
|
|
603
662
|
}
|
|
604
663
|
catch (err) {
|
|
605
664
|
if (err instanceof _4_errors_js_1.PasswordHashInvalid) {
|
|
@@ -656,36 +715,36 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
656
715
|
}
|
|
657
716
|
}
|
|
658
717
|
async getUserAccessHash(userId) {
|
|
659
|
-
const users = await this.invoke(new _2_tl_js_1.functions.
|
|
660
|
-
return users[0]?.[_2_tl_js_1.as](_2_tl_js_1.types.User).
|
|
718
|
+
const users = await this.invoke(new _2_tl_js_1.functions.users.getUsers({ id: [new _2_tl_js_1.types.InputUser({ user_id: userId, access_hash: 0n })] }));
|
|
719
|
+
return users[0]?.[_2_tl_js_1.as](_2_tl_js_1.types.User).access_hash ?? 0n;
|
|
661
720
|
}
|
|
662
721
|
async getInputPeer(id) {
|
|
663
722
|
const inputPeer = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getInputPeerInner).call(this, id);
|
|
664
|
-
if ((inputPeer instanceof _2_tl_js_1.types.InputPeerUser || inputPeer instanceof _2_tl_js_1.types.InputPeerChannel && inputPeer.
|
|
665
|
-
if ("
|
|
666
|
-
inputPeer.
|
|
723
|
+
if ((inputPeer instanceof _2_tl_js_1.types.InputPeerUser || inputPeer instanceof _2_tl_js_1.types.InputPeerChannel && inputPeer.access_hash == 0n) && await this.storage.getAccountType() == "bot") {
|
|
724
|
+
if ("channel_id" in inputPeer) {
|
|
725
|
+
inputPeer.access_hash = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getChannelAccessHash).call(this, inputPeer.channel_id);
|
|
667
726
|
}
|
|
668
727
|
else {
|
|
669
|
-
inputPeer.
|
|
670
|
-
await this.storage.setUserAccessHash(inputPeer.
|
|
728
|
+
inputPeer.access_hash = await this.getUserAccessHash(inputPeer.user_id);
|
|
729
|
+
await this.storage.setUserAccessHash(inputPeer.user_id, inputPeer.access_hash);
|
|
671
730
|
}
|
|
672
731
|
}
|
|
673
732
|
return inputPeer;
|
|
674
733
|
}
|
|
675
734
|
[(_Client_initConnection = async function _Client_initConnection() {
|
|
676
735
|
if (!__classPrivateFieldGet(this, _Client_connectionInited, "f")) {
|
|
677
|
-
await this.invoke(new _2_tl_js_1.functions.
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
query: new _2_tl_js_1.functions.
|
|
736
|
+
await this.invoke(new _2_tl_js_1.functions.initConnection({
|
|
737
|
+
api_id: this.apiId,
|
|
738
|
+
app_version: this.appVersion,
|
|
739
|
+
device_model: this.deviceModel,
|
|
740
|
+
lang_code: this.langCode,
|
|
741
|
+
lang_pack: this.langPack,
|
|
742
|
+
query: new _2_tl_js_1.functions.invokeWithLayer({
|
|
684
743
|
layer: _4_constants_js_1.LAYER,
|
|
685
|
-
query: new _2_tl_js_1.functions.
|
|
744
|
+
query: new _2_tl_js_1.functions.help.getConfig(),
|
|
686
745
|
}),
|
|
687
|
-
|
|
688
|
-
|
|
746
|
+
system_lang_code: this.systemLangCode,
|
|
747
|
+
system_version: this.systemVersion,
|
|
689
748
|
}));
|
|
690
749
|
__classPrivateFieldSet(this, _Client_connectionInited, true, "f");
|
|
691
750
|
d("connection inited");
|
|
@@ -707,7 +766,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
707
766
|
while (this.connected) {
|
|
708
767
|
try {
|
|
709
768
|
if (__classPrivateFieldGet(this, _Client_toAcknowledge, "f").size >= _4_constants_js_1.ACK_THRESHOLD) {
|
|
710
|
-
await this.send(new _2_tl_js_1.types.
|
|
769
|
+
await this.send(new _2_tl_js_1.types.Msgs_ack({ msg_ids: [...__classPrivateFieldGet(this, _Client_toAcknowledge, "f")] }));
|
|
711
770
|
__classPrivateFieldGet(this, _Client_toAcknowledge, "f").clear();
|
|
712
771
|
}
|
|
713
772
|
const buffer = await this.transport.transport.receive();
|
|
@@ -723,33 +782,33 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
723
782
|
const messages = decrypted instanceof _2_tl_js_1.MessageContainer ? decrypted.messages : [decrypted];
|
|
724
783
|
for (const message of messages) {
|
|
725
784
|
let body = message.body;
|
|
726
|
-
if (body instanceof _2_tl_js_1.types.
|
|
727
|
-
body = new _2_tl_js_1.TLReader((0, _0_deps_js_1.gunzip)(body.
|
|
785
|
+
if (body instanceof _2_tl_js_1.types.Gzip_packed) {
|
|
786
|
+
body = new _2_tl_js_1.TLReader((0, _0_deps_js_1.gunzip)(body.packed_data)).readObject();
|
|
728
787
|
}
|
|
729
|
-
dRecv("received %s", body.constructor.name);
|
|
730
|
-
if (body instanceof _2_tl_js_1.types.
|
|
788
|
+
dRecv("received %s", (typeof body === "object" && _2_tl_js_1.name in body) ? body[_2_tl_js_1.name] : body.constructor.name);
|
|
789
|
+
if (body instanceof _2_tl_js_1.types._Updates || body instanceof _2_tl_js_1.types._Update) {
|
|
731
790
|
__classPrivateFieldGet(this, _Client_processUpdatesQueue, "f").add(() => __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, body, true));
|
|
732
791
|
}
|
|
733
|
-
else if (body instanceof _2_tl_js_1.types.
|
|
734
|
-
__classPrivateFieldGet(this, _Client_state, "f").salt = body.
|
|
792
|
+
else if (body instanceof _2_tl_js_1.types.New_session_created) {
|
|
793
|
+
__classPrivateFieldGet(this, _Client_state, "f").salt = body.server_salt;
|
|
735
794
|
await this.storage.setServerSalt(__classPrivateFieldGet(this, _Client_state, "f").salt);
|
|
736
795
|
}
|
|
737
796
|
else if (message.body instanceof _2_tl_js_1.RPCResult) {
|
|
738
797
|
let result = message.body.result;
|
|
739
|
-
if (result instanceof _2_tl_js_1.types.
|
|
740
|
-
result = new _2_tl_js_1.TLReader((0, _0_deps_js_1.gunzip)(result.
|
|
798
|
+
if (result instanceof _2_tl_js_1.types.Gzip_packed) {
|
|
799
|
+
result = new _2_tl_js_1.TLReader((0, _0_deps_js_1.gunzip)(result.packed_data)).readObject();
|
|
741
800
|
}
|
|
742
|
-
if (result instanceof _2_tl_js_1.types.
|
|
743
|
-
dRecv("RPCResult: %d %s", result.
|
|
801
|
+
if (result instanceof _2_tl_js_1.types.Rpc_error) {
|
|
802
|
+
dRecv("RPCResult: %d %s", result.error_code, result.error_message);
|
|
744
803
|
}
|
|
745
804
|
else {
|
|
746
|
-
dRecv("RPCResult: %s", result.constructor.name);
|
|
805
|
+
dRecv("RPCResult: %s", (typeof result === "object" && _2_tl_js_1.name in result) ? result[_2_tl_js_1.name] : result.constructor.name);
|
|
747
806
|
}
|
|
748
807
|
const messageId = message.body.messageId;
|
|
749
808
|
const resolvePromise = () => {
|
|
750
809
|
const promise = __classPrivateFieldGet(this, _Client_promises, "f").get(messageId);
|
|
751
810
|
if (promise) {
|
|
752
|
-
if (result instanceof _2_tl_js_1.types.
|
|
811
|
+
if (result instanceof _2_tl_js_1.types.Rpc_error) {
|
|
753
812
|
promise.reject((0, _4_errors_js_1.upgradeInstance)(result));
|
|
754
813
|
}
|
|
755
814
|
else {
|
|
@@ -758,7 +817,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
758
817
|
__classPrivateFieldGet(this, _Client_promises, "f").delete(messageId);
|
|
759
818
|
}
|
|
760
819
|
};
|
|
761
|
-
if (result instanceof _2_tl_js_1.types.
|
|
820
|
+
if (result instanceof _2_tl_js_1.types._Updates || result instanceof _2_tl_js_1.types._Update) {
|
|
762
821
|
__classPrivateFieldGet(this, _Client_processUpdatesQueue, "f").add(async () => {
|
|
763
822
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, result, true);
|
|
764
823
|
resolvePromise();
|
|
@@ -770,20 +829,20 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
770
829
|
}
|
|
771
830
|
}
|
|
772
831
|
else if (message.body instanceof _2_tl_js_1.types.Pong) {
|
|
773
|
-
const promise = __classPrivateFieldGet(this, _Client_promises, "f").get(message.body.
|
|
832
|
+
const promise = __classPrivateFieldGet(this, _Client_promises, "f").get(message.body.msg_id);
|
|
774
833
|
if (promise) {
|
|
775
834
|
promise.resolve(message.body);
|
|
776
|
-
__classPrivateFieldGet(this, _Client_promises, "f").delete(message.body.
|
|
835
|
+
__classPrivateFieldGet(this, _Client_promises, "f").delete(message.body.msg_id);
|
|
777
836
|
}
|
|
778
837
|
}
|
|
779
|
-
else if (message.body instanceof _2_tl_js_1.types.
|
|
838
|
+
else if (message.body instanceof _2_tl_js_1.types.Bad_server_salt) {
|
|
780
839
|
d("server salt reassigned");
|
|
781
|
-
__classPrivateFieldGet(this, _Client_state, "f").salt = message.body.
|
|
840
|
+
__classPrivateFieldGet(this, _Client_state, "f").salt = message.body.new_server_salt;
|
|
782
841
|
await this.storage.setServerSalt(__classPrivateFieldGet(this, _Client_state, "f").salt);
|
|
783
|
-
const promise = __classPrivateFieldGet(this, _Client_promises, "f").get(message.body.
|
|
842
|
+
const promise = __classPrivateFieldGet(this, _Client_promises, "f").get(message.body.bad_msg_id);
|
|
784
843
|
if (promise) {
|
|
785
844
|
promise.resolve(message.body);
|
|
786
|
-
__classPrivateFieldGet(this, _Client_promises, "f").delete(message.body.
|
|
845
|
+
__classPrivateFieldGet(this, _Client_promises, "f").delete(message.body.bad_msg_id);
|
|
787
846
|
}
|
|
788
847
|
}
|
|
789
848
|
__classPrivateFieldGet(this, _Client_toAcknowledge, "f").add(message.id);
|
|
@@ -814,7 +873,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
814
873
|
while (this.connected) {
|
|
815
874
|
await new Promise((r) => setTimeout(r, __classPrivateFieldGet(this, _Client_pingInterval, "f")));
|
|
816
875
|
try {
|
|
817
|
-
await this.invoke(new _2_tl_js_1.functions.
|
|
876
|
+
await this.invoke(new _2_tl_js_1.functions.ping_delay_disconnect({ ping_id: (0, _1_utilities_js_1.getRandomBigInt)(8, true, false), disconnect_delay: __classPrivateFieldGet(this, _Client_pingInterval, "f") + 15 }));
|
|
818
877
|
}
|
|
819
878
|
catch (err) {
|
|
820
879
|
d("ping loop error: %o", err);
|
|
@@ -836,18 +895,18 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
836
895
|
while (true) {
|
|
837
896
|
try {
|
|
838
897
|
let seqNo = __classPrivateFieldGet(this, _Client_state, "f").seqNo * 2;
|
|
839
|
-
if (!(function_ instanceof _2_tl_js_1.functions.
|
|
898
|
+
if (!(function_ instanceof _2_tl_js_1.functions.ping) && !(function_ instanceof _2_tl_js_1.types.Msgs_ack)) {
|
|
840
899
|
seqNo++;
|
|
841
900
|
__classPrivateFieldGet(this, _Client_state, "f").seqNo++;
|
|
842
901
|
}
|
|
843
902
|
const messageId = __classPrivateFieldSet(this, _Client_lastMsgId, (0, _0_message_js_1.getMessageId)(__classPrivateFieldGet(this, _Client_lastMsgId, "f")), "f");
|
|
844
903
|
const message = new _2_tl_js_1.Message_(messageId, seqNo, function_);
|
|
845
904
|
await this.transport.transport.send(await (0, _0_message_js_1.encryptMessage)(message, __classPrivateFieldGet(this, _Client_auth, "f").key, __classPrivateFieldGet(this, _Client_auth, "f").id, __classPrivateFieldGet(this, _Client_state, "f").salt, __classPrivateFieldGet(this, _Client_sessionId, "f")));
|
|
846
|
-
d("invoked %s", function_.
|
|
905
|
+
d("invoked %s", function_[_2_tl_js_1.name]);
|
|
847
906
|
if (noWait) {
|
|
848
907
|
__classPrivateFieldGet(this, _Client_promises, "f").set(message.id, {
|
|
849
908
|
resolve: (result) => {
|
|
850
|
-
if (result instanceof _2_tl_js_1.types.
|
|
909
|
+
if (result instanceof _2_tl_js_1.types.Bad_server_salt) {
|
|
851
910
|
(0, _1_utilities_js_1.drop)(this.invoke(function_, true));
|
|
852
911
|
}
|
|
853
912
|
},
|
|
@@ -867,7 +926,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
867
926
|
}
|
|
868
927
|
throw err;
|
|
869
928
|
}
|
|
870
|
-
if (result instanceof _2_tl_js_1.types.
|
|
929
|
+
if (result instanceof _2_tl_js_1.types.Bad_server_salt) {
|
|
871
930
|
return await this.invoke(function_);
|
|
872
931
|
}
|
|
873
932
|
else {
|
|
@@ -889,9 +948,9 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
889
948
|
}
|
|
890
949
|
}, _Client_processChats = async function _Client_processChats(chats) {
|
|
891
950
|
for (const chat of chats) {
|
|
892
|
-
if (chat instanceof _2_tl_js_1.types.Channel && chat.
|
|
951
|
+
if (chat instanceof _2_tl_js_1.types.Channel && chat.access_hash) {
|
|
893
952
|
await this.storage.setEntity(chat);
|
|
894
|
-
await this.storage.setChannelAccessHash(chat.id, chat.
|
|
953
|
+
await this.storage.setChannelAccessHash(chat.id, chat.access_hash);
|
|
895
954
|
if (chat.username) {
|
|
896
955
|
await this.storage.updateUsernames("channel", chat.id, [chat.username]);
|
|
897
956
|
}
|
|
@@ -905,9 +964,9 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
905
964
|
}
|
|
906
965
|
}, _Client_processUsers = async function _Client_processUsers(users) {
|
|
907
966
|
for (const user of users) {
|
|
908
|
-
if (user instanceof _2_tl_js_1.types.User && user.
|
|
967
|
+
if (user instanceof _2_tl_js_1.types.User && user.access_hash) {
|
|
909
968
|
await this.storage.setEntity(user);
|
|
910
|
-
await this.storage.setUserAccessHash(user.id, user.
|
|
969
|
+
await this.storage.setUserAccessHash(user.id, user.access_hash);
|
|
911
970
|
if (user.username) {
|
|
912
971
|
await this.storage.updateUsernames("user", user.id, [user.username]);
|
|
913
972
|
}
|
|
@@ -935,6 +994,34 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
935
994
|
let updates;
|
|
936
995
|
if (updates_ instanceof _2_tl_js_1.types.UpdatesCombined || updates_ instanceof _2_tl_js_1.types.Updates) {
|
|
937
996
|
updates = updates_.updates;
|
|
997
|
+
const seq = updates_.seq;
|
|
998
|
+
const seqStart = "seq_start" in updates_ ? updates_.seq_start : updates_.seq;
|
|
999
|
+
if (checkGap) {
|
|
1000
|
+
if (seqStart == 0) {
|
|
1001
|
+
checkGap = false;
|
|
1002
|
+
d("seqStart=0");
|
|
1003
|
+
}
|
|
1004
|
+
else {
|
|
1005
|
+
const localState = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getLocalState).call(this);
|
|
1006
|
+
const localSeq = localState.seq;
|
|
1007
|
+
if (localSeq + 1 == seqStart) {
|
|
1008
|
+
// The updates can be applied.
|
|
1009
|
+
localState.seq = seq;
|
|
1010
|
+
localState.date = updates_.date;
|
|
1011
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setUpdateStateDate).call(this, updates_.date);
|
|
1012
|
+
await this.storage.setState(localState);
|
|
1013
|
+
}
|
|
1014
|
+
else if (localSeq + 1 > seqStart) {
|
|
1015
|
+
// The updates were already applied, and must be ignored.
|
|
1016
|
+
d("localSeq + 1 > seqStart");
|
|
1017
|
+
return;
|
|
1018
|
+
}
|
|
1019
|
+
else if (localSeq + 1 < seqStart) {
|
|
1020
|
+
// There's an updates gap that must be filled.
|
|
1021
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_recoverUpdateGap).call(this, "localSeq + 1 < seqStart");
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
938
1025
|
}
|
|
939
1026
|
else if (updates_ instanceof _2_tl_js_1.types.UpdateShort) {
|
|
940
1027
|
updates = [updates_.update];
|
|
@@ -948,7 +1035,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
948
1035
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_recoverUpdateGap).call(this, "updatesTooLong");
|
|
949
1036
|
return;
|
|
950
1037
|
}
|
|
951
|
-
else if (updates_ instanceof _2_tl_js_1.types.
|
|
1038
|
+
else if (updates_ instanceof _2_tl_js_1.types._Update) {
|
|
952
1039
|
updates = [updates_];
|
|
953
1040
|
}
|
|
954
1041
|
else {
|
|
@@ -967,11 +1054,11 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
967
1054
|
continue;
|
|
968
1055
|
}
|
|
969
1056
|
if (checkGap) {
|
|
970
|
-
await this.checkGap(update.pts, update.
|
|
1057
|
+
await this.checkGap(update.pts, update.pts_count);
|
|
971
1058
|
}
|
|
972
1059
|
localState ??= await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getLocalState).call(this);
|
|
973
1060
|
originalPts ??= localState.pts;
|
|
974
|
-
if (localState.pts + update.
|
|
1061
|
+
if (localState.pts + update.pts_count > update.pts) {
|
|
975
1062
|
updates = updates.filter((v) => v != update);
|
|
976
1063
|
}
|
|
977
1064
|
else {
|
|
@@ -982,8 +1069,8 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
982
1069
|
if (update.pts == 0) {
|
|
983
1070
|
continue;
|
|
984
1071
|
}
|
|
985
|
-
const ptsCount = update.
|
|
986
|
-
const channelId = update instanceof _2_tl_js_1.types.UpdateNewChannelMessage || update instanceof _2_tl_js_1.types.UpdateEditChannelMessage ? update.message.
|
|
1072
|
+
const ptsCount = update.pts_count;
|
|
1073
|
+
const channelId = update instanceof _2_tl_js_1.types.UpdateNewChannelMessage || update instanceof _2_tl_js_1.types.UpdateEditChannelMessage ? update.message.peer_id[_2_tl_js_1.as](_2_tl_js_1.types.PeerChannel).channel_id : update.channel_id;
|
|
987
1074
|
if (checkGap) {
|
|
988
1075
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_checkChannelGap).call(this, channelId, update.pts, ptsCount);
|
|
989
1076
|
}
|
|
@@ -1018,12 +1105,12 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1018
1105
|
}
|
|
1019
1106
|
else if (update instanceof _2_tl_js_1.types.UpdateChannelTooLong) {
|
|
1020
1107
|
if (update.pts != undefined) {
|
|
1021
|
-
await this.storage.setChannelPts(update.
|
|
1108
|
+
await this.storage.setChannelPts(update.channel_id, update.pts);
|
|
1022
1109
|
}
|
|
1023
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_recoverChannelUpdateGap).call(this, update.
|
|
1110
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_recoverChannelUpdateGap).call(this, update.channel_id, "updateChannelTooLong");
|
|
1024
1111
|
}
|
|
1025
1112
|
else if (update instanceof _2_tl_js_1.types.UpdateUserName) {
|
|
1026
|
-
await this.storage.updateUsernames("user", update.
|
|
1113
|
+
await this.storage.updateUsernames("user", update.user_id, update.usernames.map((v) => v.username));
|
|
1027
1114
|
}
|
|
1028
1115
|
else if (update instanceof _2_tl_js_1.types.UpdatePtsChanged) {
|
|
1029
1116
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_fetchState).call(this, "updatePtsChanged");
|
|
@@ -1034,8 +1121,23 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1034
1121
|
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
1035
1122
|
}
|
|
1036
1123
|
}
|
|
1124
|
+
if ((0, _0_utilities_js_1.isPtsUpdate)(update)) {
|
|
1125
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setUpdatePts).call(this, update.pts);
|
|
1126
|
+
}
|
|
1127
|
+
else if ((0, _0_utilities_js_1.isChannelPtsUpdate)(update)) {
|
|
1128
|
+
let channelId = null;
|
|
1129
|
+
if ("channel_id" in update) {
|
|
1130
|
+
channelId = update.channel_id;
|
|
1131
|
+
}
|
|
1132
|
+
else if ("peer_id" in update.message && update.message.peer_id !== undefined && "channel_id" in update.message.peer_id) {
|
|
1133
|
+
channelId = update.message.peer_id.channel_id;
|
|
1134
|
+
}
|
|
1135
|
+
if (channelId != null) {
|
|
1136
|
+
await this.storage.setChannelPts(channelId, update.pts);
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1037
1139
|
/// If there were any Update, they will be passed to the update handling queue.
|
|
1038
|
-
if (update instanceof _2_tl_js_1.types.
|
|
1140
|
+
if (update instanceof _2_tl_js_1.types._Update) {
|
|
1039
1141
|
updatesToHandle.push(update);
|
|
1040
1142
|
}
|
|
1041
1143
|
}
|
|
@@ -1048,6 +1150,10 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1048
1150
|
const localState = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getLocalState).call(this);
|
|
1049
1151
|
localState.date = date;
|
|
1050
1152
|
await this.storage.setState(localState);
|
|
1153
|
+
}, _Client_setUpdatePts = async function _Client_setUpdatePts(pts) {
|
|
1154
|
+
const localState = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getLocalState).call(this);
|
|
1155
|
+
localState.pts = pts;
|
|
1156
|
+
await this.storage.setState(localState);
|
|
1051
1157
|
}, _Client_getLocalState = async function _Client_getLocalState() {
|
|
1052
1158
|
let localState = await this.storage.getState();
|
|
1053
1159
|
if (!localState) {
|
|
@@ -1073,34 +1179,34 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1073
1179
|
try {
|
|
1074
1180
|
let state = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getLocalState).call(this);
|
|
1075
1181
|
while (true) {
|
|
1076
|
-
const difference = await this.invoke(new _2_tl_js_1.functions.
|
|
1077
|
-
if (difference instanceof _2_tl_js_1.types.
|
|
1182
|
+
const difference = await this.invoke(new _2_tl_js_1.functions.updates.getDifference({ pts: state.pts, date: state.date, qts: state.qts ?? 0 }));
|
|
1183
|
+
if (difference instanceof _2_tl_js_1.types.updates.Difference || difference instanceof _2_tl_js_1.types.updates.DifferenceSlice) {
|
|
1078
1184
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processChats).call(this, difference.chats);
|
|
1079
1185
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUsers).call(this, difference.users);
|
|
1080
|
-
for (const message of difference.
|
|
1081
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, new _2_tl_js_1.types.UpdateNewMessage({ message, pts: 0,
|
|
1186
|
+
for (const message of difference.new_messages) {
|
|
1187
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, new _2_tl_js_1.types.UpdateNewMessage({ message, pts: 0, pts_count: 0 }), false);
|
|
1082
1188
|
}
|
|
1083
|
-
for (const update of difference.
|
|
1189
|
+
for (const update of difference.other_updates) {
|
|
1084
1190
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, update, false);
|
|
1085
1191
|
}
|
|
1086
|
-
if (difference instanceof _2_tl_js_1.types.
|
|
1192
|
+
if (difference instanceof _2_tl_js_1.types.updates.Difference) {
|
|
1087
1193
|
await this.storage.setState(difference.state);
|
|
1088
1194
|
dGap("recovered from update gap");
|
|
1089
1195
|
break;
|
|
1090
1196
|
}
|
|
1091
|
-
else if (difference instanceof _2_tl_js_1.types.
|
|
1092
|
-
state = difference.
|
|
1197
|
+
else if (difference instanceof _2_tl_js_1.types.updates.DifferenceSlice) {
|
|
1198
|
+
state = difference.intermediate_state;
|
|
1093
1199
|
}
|
|
1094
1200
|
else {
|
|
1095
1201
|
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
1096
1202
|
}
|
|
1097
1203
|
}
|
|
1098
|
-
else if (difference instanceof _2_tl_js_1.types.
|
|
1204
|
+
else if (difference instanceof _2_tl_js_1.types.updates.DifferenceTooLong) {
|
|
1099
1205
|
await this.storage.deleteMessages();
|
|
1100
1206
|
state.pts = difference.pts;
|
|
1101
1207
|
dGap("received differenceTooLong");
|
|
1102
1208
|
}
|
|
1103
|
-
else if (difference instanceof _2_tl_js_1.types.
|
|
1209
|
+
else if (difference instanceof _2_tl_js_1.types.updates.DifferenceEmpty) {
|
|
1104
1210
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setUpdateStateDate).call(this, difference.date);
|
|
1105
1211
|
dGap("there was no update gap");
|
|
1106
1212
|
break;
|
|
@@ -1118,33 +1224,33 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1118
1224
|
const pts_ = await this.storage.getChannelPts(channelId);
|
|
1119
1225
|
let pts = pts_ == null ? 1 : pts_;
|
|
1120
1226
|
while (true) {
|
|
1121
|
-
const {
|
|
1122
|
-
const difference = await this.invoke(new _2_tl_js_1.functions.
|
|
1227
|
+
const { access_hash } = await this.getInputPeer(_4_constants_js_1.ZERO_CHANNEL_ID + -Number(channelId)).then((v) => v[_2_tl_js_1.as](_2_tl_js_1.types.InputPeerChannel));
|
|
1228
|
+
const difference = await this.invoke(new _2_tl_js_1.functions.updates.getChannelDifference({
|
|
1123
1229
|
pts,
|
|
1124
|
-
channel: new _2_tl_js_1.types.InputChannel({ channelId,
|
|
1230
|
+
channel: new _2_tl_js_1.types.InputChannel({ channel_id: channelId, access_hash }),
|
|
1125
1231
|
filter: new _2_tl_js_1.types.ChannelMessagesFilterEmpty(),
|
|
1126
1232
|
limit: await this.storage.getAccountType() == "user" ? _4_constants_js_1.CHANNEL_DIFFERENCE_LIMIT_USER : _4_constants_js_1.CHANNEL_DIFFERENCE_LIMIT_BOT,
|
|
1127
1233
|
}));
|
|
1128
|
-
if (difference instanceof _2_tl_js_1.types.
|
|
1234
|
+
if (difference instanceof _2_tl_js_1.types.updates.ChannelDifference) {
|
|
1129
1235
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processChats).call(this, difference.chats);
|
|
1130
1236
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUsers).call(this, difference.users);
|
|
1131
|
-
for (const message of difference.
|
|
1132
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, new _2_tl_js_1.types.UpdateNewChannelMessage({ message, pts: 0,
|
|
1237
|
+
for (const message of difference.new_messages) {
|
|
1238
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, new _2_tl_js_1.types.UpdateNewChannelMessage({ message, pts: 0, pts_count: 0 }), false);
|
|
1133
1239
|
}
|
|
1134
|
-
for (const update of difference.
|
|
1240
|
+
for (const update of difference.other_updates) {
|
|
1135
1241
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, update, false);
|
|
1136
1242
|
}
|
|
1137
1243
|
await this.storage.setChannelPts(channelId, difference.pts);
|
|
1138
1244
|
dGapC("recovered from update gap [%o, %s]", channelId, source);
|
|
1139
1245
|
break;
|
|
1140
1246
|
}
|
|
1141
|
-
else if (difference instanceof _2_tl_js_1.types.
|
|
1247
|
+
else if (difference instanceof _2_tl_js_1.types.updates.ChannelDifferenceTooLong) {
|
|
1142
1248
|
// invalidate messages
|
|
1143
1249
|
dGapC("received channelDifferenceTooLong");
|
|
1144
1250
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processChats).call(this, difference.chats);
|
|
1145
1251
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUsers).call(this, difference.users);
|
|
1146
1252
|
for (const message of difference.messages) {
|
|
1147
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, new _2_tl_js_1.types.UpdateNewChannelMessage({ message, pts: 0,
|
|
1253
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, new _2_tl_js_1.types.UpdateNewChannelMessage({ message, pts: 0, pts_count: 0 }), false);
|
|
1148
1254
|
}
|
|
1149
1255
|
const pts_ = difference.dialog[_2_tl_js_1.as](_2_tl_js_1.types.Dialog).pts;
|
|
1150
1256
|
if (pts_ != undefined) {
|
|
@@ -1155,14 +1261,14 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1155
1261
|
}
|
|
1156
1262
|
dGapC("processed channelDifferenceTooLong");
|
|
1157
1263
|
}
|
|
1158
|
-
else if (difference instanceof _2_tl_js_1.types.
|
|
1264
|
+
else if (difference instanceof _2_tl_js_1.types.updates.ChannelDifferenceEmpty) {
|
|
1159
1265
|
dGapC("there was no update gap");
|
|
1160
1266
|
break;
|
|
1161
1267
|
}
|
|
1162
1268
|
}
|
|
1163
1269
|
}, _Client_getChannelAccessHash = async function _Client_getChannelAccessHash(channelId) {
|
|
1164
|
-
const channels = await this.invoke(new _2_tl_js_1.functions.
|
|
1165
|
-
return channels.chats[0][_2_tl_js_1.as](_2_tl_js_1.types.Channel).
|
|
1270
|
+
const channels = await this.invoke(new _2_tl_js_1.functions.channels.getChannels({ id: [new _2_tl_js_1.types.InputChannel({ channel_id: channelId, access_hash: 0n })] }));
|
|
1271
|
+
return channels.chats[0][_2_tl_js_1.as](_2_tl_js_1.types.Channel).access_hash ?? 0n;
|
|
1166
1272
|
}, _Client_getInputPeerInner = async function _Client_getInputPeerInner(id) {
|
|
1167
1273
|
if (typeof id === "string") {
|
|
1168
1274
|
id = (0, _0_utilities_js_1.getUsername)(id);
|
|
@@ -1179,14 +1285,14 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1179
1285
|
}
|
|
1180
1286
|
}
|
|
1181
1287
|
else {
|
|
1182
|
-
const resolved = await this.invoke(new _2_tl_js_1.functions.
|
|
1288
|
+
const resolved = await this.invoke(new _2_tl_js_1.functions.contacts.resolveUsername({ username: id }));
|
|
1183
1289
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processChats).call(this, resolved.chats);
|
|
1184
1290
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUsers).call(this, resolved.users);
|
|
1185
1291
|
if (resolved.peer instanceof _2_tl_js_1.types.PeerUser) {
|
|
1186
|
-
userId = resolved.peer.
|
|
1292
|
+
userId = resolved.peer.user_id;
|
|
1187
1293
|
}
|
|
1188
1294
|
else if (resolved.peer instanceof _2_tl_js_1.types.PeerChannel) {
|
|
1189
|
-
channelId = resolved.peer.
|
|
1295
|
+
channelId = resolved.peer.channel_id;
|
|
1190
1296
|
}
|
|
1191
1297
|
else {
|
|
1192
1298
|
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
@@ -1194,11 +1300,11 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1194
1300
|
}
|
|
1195
1301
|
if (userId) {
|
|
1196
1302
|
const accessHash = await this.storage.getUserAccessHash(userId);
|
|
1197
|
-
return new _2_tl_js_1.types.InputPeerUser({ userId,
|
|
1303
|
+
return new _2_tl_js_1.types.InputPeerUser({ user_id: userId, access_hash: accessHash ?? 0n });
|
|
1198
1304
|
}
|
|
1199
1305
|
else if (channelId) {
|
|
1200
1306
|
const accessHash = await this.storage.getChannelAccessHash(channelId);
|
|
1201
|
-
return new _2_tl_js_1.types.InputPeerChannel({ channelId,
|
|
1307
|
+
return new _2_tl_js_1.types.InputPeerChannel({ channel_id: channelId, access_hash: accessHash ?? 0n });
|
|
1202
1308
|
}
|
|
1203
1309
|
else {
|
|
1204
1310
|
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
@@ -1207,70 +1313,70 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1207
1313
|
else if (id > 0) {
|
|
1208
1314
|
const id_ = BigInt(id);
|
|
1209
1315
|
const accessHash = await this.storage.getUserAccessHash(id_);
|
|
1210
|
-
return new _2_tl_js_1.types.InputPeerUser({
|
|
1316
|
+
return new _2_tl_js_1.types.InputPeerUser({ user_id: id_, access_hash: accessHash ?? 0n });
|
|
1211
1317
|
}
|
|
1212
1318
|
else if (-_4_constants_js_1.MAX_CHAT_ID <= id) {
|
|
1213
|
-
return new _2_tl_js_1.types.InputPeerChat({
|
|
1319
|
+
return new _2_tl_js_1.types.InputPeerChat({ chat_id: BigInt(Math.abs(id)) });
|
|
1214
1320
|
}
|
|
1215
1321
|
else if (_4_constants_js_1.ZERO_CHANNEL_ID - _4_constants_js_1.MAX_CHANNEL_ID <= id && id != _4_constants_js_1.ZERO_CHANNEL_ID) {
|
|
1216
1322
|
const id_ = BigInt(Math.abs(id - _4_constants_js_1.ZERO_CHANNEL_ID));
|
|
1217
1323
|
const accessHash = await this.storage.getChannelAccessHash(id_);
|
|
1218
|
-
return new _2_tl_js_1.types.InputPeerChannel({
|
|
1324
|
+
return new _2_tl_js_1.types.InputPeerChannel({ channel_id: id_, access_hash: accessHash ?? 0n });
|
|
1219
1325
|
}
|
|
1220
1326
|
else {
|
|
1221
1327
|
throw new Error("ID format unknown or not implemented");
|
|
1222
1328
|
}
|
|
1223
1329
|
}, getEntity)](peer) {
|
|
1224
1330
|
const type = peer instanceof _2_tl_js_1.types.PeerUser ? "user" : peer instanceof _2_tl_js_1.types.PeerChat ? "chat" : peer instanceof _2_tl_js_1.types.PeerChannel ? "channel" : (0, _1_utilities_js_1.UNREACHABLE)();
|
|
1225
|
-
const id = peer instanceof _2_tl_js_1.types.PeerUser ? peer.
|
|
1331
|
+
const id = peer instanceof _2_tl_js_1.types.PeerUser ? peer.user_id : peer instanceof _2_tl_js_1.types.PeerChat ? peer.chat_id : peer instanceof _2_tl_js_1.types.PeerChannel ? peer.channel_id : (0, _1_utilities_js_1.UNREACHABLE)();
|
|
1226
1332
|
return this.storage.getEntity(type, id);
|
|
1227
1333
|
}
|
|
1228
1334
|
async processResult(result) {
|
|
1229
|
-
if (result instanceof _2_tl_js_1.types.
|
|
1230
|
-
result instanceof _2_tl_js_1.types.
|
|
1231
|
-
result instanceof _2_tl_js_1.types.
|
|
1232
|
-
result instanceof _2_tl_js_1.types.
|
|
1233
|
-
result instanceof _2_tl_js_1.types.
|
|
1234
|
-
result instanceof _2_tl_js_1.types.
|
|
1235
|
-
result instanceof _2_tl_js_1.types.
|
|
1236
|
-
result instanceof _2_tl_js_1.types.
|
|
1237
|
-
result instanceof _2_tl_js_1.types.
|
|
1238
|
-
result instanceof _2_tl_js_1.types.
|
|
1239
|
-
result instanceof _2_tl_js_1.types.
|
|
1240
|
-
result instanceof _2_tl_js_1.types.
|
|
1241
|
-
result instanceof _2_tl_js_1.types.
|
|
1242
|
-
result instanceof _2_tl_js_1.types.
|
|
1243
|
-
result instanceof _2_tl_js_1.types.
|
|
1244
|
-
result instanceof _2_tl_js_1.types.
|
|
1245
|
-
result instanceof _2_tl_js_1.types.
|
|
1246
|
-
result instanceof _2_tl_js_1.types.
|
|
1247
|
-
result instanceof _2_tl_js_1.types.
|
|
1248
|
-
result instanceof _2_tl_js_1.types.
|
|
1249
|
-
result instanceof _2_tl_js_1.types.
|
|
1250
|
-
result instanceof _2_tl_js_1.types.
|
|
1251
|
-
result instanceof _2_tl_js_1.types.
|
|
1252
|
-
result instanceof _2_tl_js_1.types.
|
|
1253
|
-
result instanceof _2_tl_js_1.types.
|
|
1254
|
-
result instanceof _2_tl_js_1.types.
|
|
1255
|
-
result instanceof _2_tl_js_1.types.
|
|
1256
|
-
result instanceof _2_tl_js_1.types.
|
|
1257
|
-
result instanceof _2_tl_js_1.types.
|
|
1258
|
-
result instanceof _2_tl_js_1.types.
|
|
1259
|
-
result instanceof _2_tl_js_1.types.
|
|
1260
|
-
result instanceof _2_tl_js_1.types.
|
|
1261
|
-
result instanceof _2_tl_js_1.types.
|
|
1262
|
-
result instanceof _2_tl_js_1.types.
|
|
1263
|
-
result instanceof _2_tl_js_1.types.
|
|
1264
|
-
result instanceof _2_tl_js_1.types.
|
|
1335
|
+
if (result instanceof _2_tl_js_1.types.messages.Dialogs ||
|
|
1336
|
+
result instanceof _2_tl_js_1.types.messages.DialogsSlice ||
|
|
1337
|
+
result instanceof _2_tl_js_1.types.messages.Messages ||
|
|
1338
|
+
result instanceof _2_tl_js_1.types.messages.MessagesSlice ||
|
|
1339
|
+
result instanceof _2_tl_js_1.types.messages.ChannelMessages ||
|
|
1340
|
+
result instanceof _2_tl_js_1.types.messages.ChatFull ||
|
|
1341
|
+
result instanceof _2_tl_js_1.types.contacts.Found ||
|
|
1342
|
+
result instanceof _2_tl_js_1.types.account.PrivacyRules ||
|
|
1343
|
+
result instanceof _2_tl_js_1.types.contacts.ResolvedPeer ||
|
|
1344
|
+
result instanceof _2_tl_js_1.types.channels.ChannelParticipants ||
|
|
1345
|
+
result instanceof _2_tl_js_1.types.channels.ChannelParticipant ||
|
|
1346
|
+
result instanceof _2_tl_js_1.types.messages.PeerDialogs ||
|
|
1347
|
+
result instanceof _2_tl_js_1.types.contacts.TopPeers ||
|
|
1348
|
+
result instanceof _2_tl_js_1.types.channels.AdminLogResults ||
|
|
1349
|
+
result instanceof _2_tl_js_1.types.help.RecentMeUrls ||
|
|
1350
|
+
result instanceof _2_tl_js_1.types.messages.InactiveChats ||
|
|
1351
|
+
result instanceof _2_tl_js_1.types.help.PromoData ||
|
|
1352
|
+
result instanceof _2_tl_js_1.types.messages.MessageViews ||
|
|
1353
|
+
result instanceof _2_tl_js_1.types.messages.DiscussionMessage ||
|
|
1354
|
+
result instanceof _2_tl_js_1.types.phone.GroupCall ||
|
|
1355
|
+
result instanceof _2_tl_js_1.types.phone.GroupParticipants ||
|
|
1356
|
+
result instanceof _2_tl_js_1.types.phone.JoinAsPeers ||
|
|
1357
|
+
result instanceof _2_tl_js_1.types.messages.SponsoredMessages ||
|
|
1358
|
+
result instanceof _2_tl_js_1.types.messages.SearchResultsCalendar ||
|
|
1359
|
+
result instanceof _2_tl_js_1.types.channels.SendAsPeers ||
|
|
1360
|
+
result instanceof _2_tl_js_1.types.users.UserFull ||
|
|
1361
|
+
result instanceof _2_tl_js_1.types.messages.PeerSettings ||
|
|
1362
|
+
result instanceof _2_tl_js_1.types.messages.MessageReactionsList ||
|
|
1363
|
+
result instanceof _2_tl_js_1.types.messages.ForumTopics ||
|
|
1364
|
+
result instanceof _2_tl_js_1.types.account.AutoSaveSettings ||
|
|
1365
|
+
result instanceof _2_tl_js_1.types.chatlists.ExportedInvites ||
|
|
1366
|
+
result instanceof _2_tl_js_1.types.chatlists.ChatlistInviteAlready ||
|
|
1367
|
+
result instanceof _2_tl_js_1.types.chatlists.ChatlistInvite ||
|
|
1368
|
+
result instanceof _2_tl_js_1.types.chatlists.ChatlistUpdates ||
|
|
1369
|
+
result instanceof _2_tl_js_1.types.messages.Chats ||
|
|
1370
|
+
result instanceof _2_tl_js_1.types.messages.ChatsSlice) {
|
|
1265
1371
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processChats).call(this, result.chats);
|
|
1266
1372
|
if ("users" in result) {
|
|
1267
1373
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUsers).call(this, result.users);
|
|
1268
1374
|
}
|
|
1269
1375
|
}
|
|
1270
|
-
if (result instanceof _2_tl_js_1.types.
|
|
1376
|
+
if (result instanceof _2_tl_js_1.types.messages.Messages) {
|
|
1271
1377
|
for (const message of result.messages) {
|
|
1272
1378
|
if (message instanceof _2_tl_js_1.types.Message || message instanceof _2_tl_js_1.types.MessageService) {
|
|
1273
|
-
await this.storage.setMessage((0, _2_tl_js_1.peerToChatId)(message.
|
|
1379
|
+
await this.storage.setMessage((0, _2_tl_js_1.peerToChatId)(message.peer_id), message.id, message);
|
|
1274
1380
|
}
|
|
1275
1381
|
}
|
|
1276
1382
|
}
|
|
@@ -1294,20 +1400,20 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1294
1400
|
const replyToMsgId = params?.replyToMessageId;
|
|
1295
1401
|
const topMsgId = params?.messageThreadId;
|
|
1296
1402
|
const sendAs = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_resolveSendAs).call(this, params);
|
|
1297
|
-
const result = await this.invoke(new _2_tl_js_1.functions.
|
|
1403
|
+
const result = await this.invoke(new _2_tl_js_1.functions.messages.sendMessage({
|
|
1298
1404
|
peer,
|
|
1299
|
-
randomId,
|
|
1405
|
+
random_id: randomId,
|
|
1300
1406
|
message,
|
|
1301
|
-
noWebpage,
|
|
1407
|
+
no_webpage: noWebpage,
|
|
1302
1408
|
silent,
|
|
1303
1409
|
noforwards,
|
|
1304
|
-
|
|
1305
|
-
sendAs,
|
|
1410
|
+
reply_to: replyToMsgId !== undefined ? new _2_tl_js_1.types.InputReplyToMessage({ reply_to_msg_id: replyToMsgId, top_msg_id: topMsgId }) : undefined,
|
|
1411
|
+
send_as: sendAs,
|
|
1306
1412
|
entities,
|
|
1307
|
-
replyMarkup,
|
|
1413
|
+
reply_markup: replyMarkup,
|
|
1308
1414
|
}));
|
|
1309
1415
|
const message_ = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
|
|
1310
|
-
return __classPrivateFieldGet(
|
|
1416
|
+
return __classPrivateFieldGet(_a, _a, "m", _Client_assertMsgHas).call(_a, message_, "text");
|
|
1311
1417
|
}
|
|
1312
1418
|
/**
|
|
1313
1419
|
* Edit a message's text.
|
|
@@ -1320,16 +1426,16 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1320
1426
|
*/
|
|
1321
1427
|
async editMessageText(chatId, messageId, text, params) {
|
|
1322
1428
|
const [message, entities] = __classPrivateFieldGet(this, _Client_instances, "m", _Client_parseText).call(this, text, params);
|
|
1323
|
-
const result = await this.invoke(new _2_tl_js_1.functions.
|
|
1429
|
+
const result = await this.invoke(new _2_tl_js_1.functions.messages.editMessage({
|
|
1324
1430
|
id: messageId,
|
|
1325
1431
|
peer: await this.getInputPeer(chatId),
|
|
1326
1432
|
entities,
|
|
1327
1433
|
message,
|
|
1328
|
-
|
|
1329
|
-
|
|
1434
|
+
no_webpage: params?.disableWebPagePreview ? true : undefined,
|
|
1435
|
+
reply_markup: await __classPrivateFieldGet(this, _Client_instances, "m", _Client_constructReplyMarkup).call(this, params),
|
|
1330
1436
|
}));
|
|
1331
1437
|
const message_ = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
|
|
1332
|
-
return __classPrivateFieldGet(
|
|
1438
|
+
return __classPrivateFieldGet(_a, _a, "m", _Client_assertMsgHas).call(_a, message_, "text");
|
|
1333
1439
|
}
|
|
1334
1440
|
/**
|
|
1335
1441
|
* Retrieve multiple messages.
|
|
@@ -1410,15 +1516,15 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1410
1516
|
}
|
|
1411
1517
|
if (shouldFetch) {
|
|
1412
1518
|
if (peer instanceof _2_tl_js_1.types.InputPeerChannel) {
|
|
1413
|
-
messages_ = await this.invoke(new _2_tl_js_1.functions.
|
|
1414
|
-
channel: new _2_tl_js_1.types.InputChannel({
|
|
1519
|
+
messages_ = await this.invoke(new _2_tl_js_1.functions.channels.getMessages({
|
|
1520
|
+
channel: new _2_tl_js_1.types.InputChannel({ channel_id: peer.channel_id, access_hash: peer.access_hash }),
|
|
1415
1521
|
id: messageIds.map((v) => new _2_tl_js_1.types.InputMessageID({ id: v })),
|
|
1416
|
-
})).then((v) => v[_2_tl_js_1.as](_2_tl_js_1.types.
|
|
1522
|
+
})).then((v) => v[_2_tl_js_1.as](_2_tl_js_1.types.messages.ChannelMessages).messages);
|
|
1417
1523
|
}
|
|
1418
1524
|
else {
|
|
1419
|
-
messages_ = await this.invoke(new _2_tl_js_1.functions.
|
|
1525
|
+
messages_ = await this.invoke(new _2_tl_js_1.functions.messages.getMessages({
|
|
1420
1526
|
id: messageIds.map((v) => new _2_tl_js_1.types.InputMessageID({ id: v })),
|
|
1421
|
-
})).then((v) => v[_2_tl_js_1.as](_2_tl_js_1.types.
|
|
1527
|
+
})).then((v) => v[_2_tl_js_1.as](_2_tl_js_1.types.messages.Messages).messages);
|
|
1422
1528
|
}
|
|
1423
1529
|
}
|
|
1424
1530
|
const messages = new Array();
|
|
@@ -1427,7 +1533,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1427
1533
|
continue;
|
|
1428
1534
|
}
|
|
1429
1535
|
const message = await (0, _3_types_js_1.constructMessage)(message_, this[getEntity].bind(this), null, this[getStickerSetName].bind(this));
|
|
1430
|
-
const isReplyToMessage = message_ instanceof _2_tl_js_1.types.Message && message_.
|
|
1536
|
+
const isReplyToMessage = message_ instanceof _2_tl_js_1.types.Message && message_.reply_to instanceof _2_tl_js_1.types.MessageReplyHeader;
|
|
1431
1537
|
messages.push({ message, isReplyToMessage });
|
|
1432
1538
|
}
|
|
1433
1539
|
return messages;
|
|
@@ -1468,7 +1574,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1468
1574
|
case _3_types_js_1.FileType.ChatPhoto: {
|
|
1469
1575
|
const big = fileId_.params.thumbnailSource == _3_types_js_1.ThumbnailSource.ChatPhotoBig;
|
|
1470
1576
|
const peer = await this.getInputPeer(fileId_.params.chatId);
|
|
1471
|
-
const location = new _2_tl_js_1.types.InputPeerPhotoFileLocation({ big: big ? true : undefined, peer,
|
|
1577
|
+
const location = new _2_tl_js_1.types.InputPeerPhotoFileLocation({ big: big ? true : undefined, peer, photo_id: fileId_.params.mediaId });
|
|
1472
1578
|
return __classPrivateFieldGet(this, _Client_instances, "m", _Client_downloadInner).call(this, location, fileId_.dcId, params);
|
|
1473
1579
|
}
|
|
1474
1580
|
case _3_types_js_1.FileType.Photo: {
|
|
@@ -1477,9 +1583,9 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1477
1583
|
}
|
|
1478
1584
|
const location = new _2_tl_js_1.types.InputPhotoFileLocation({
|
|
1479
1585
|
id: fileId_.params.mediaId,
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1586
|
+
access_hash: fileId_.params.accessHash,
|
|
1587
|
+
file_reference: fileId_.params.fileReference,
|
|
1588
|
+
thumb_size: fileId_.params.thumbnailSize,
|
|
1483
1589
|
});
|
|
1484
1590
|
return __classPrivateFieldGet(this, _Client_instances, "m", _Client_downloadInner).call(this, location, fileId_.dcId, params);
|
|
1485
1591
|
}
|
|
@@ -1492,8 +1598,8 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1492
1598
|
if ((0, _1_utilities_js_1.mod)(chunkSize, 1024) != 0) {
|
|
1493
1599
|
throw new Error("chunkSize must be divisible by 1024");
|
|
1494
1600
|
}
|
|
1495
|
-
const exportedAuth = await this.invoke(new _2_tl_js_1.functions.
|
|
1496
|
-
const client = new
|
|
1601
|
+
const exportedAuth = await this.invoke(new _2_tl_js_1.functions.auth.exportAuthorization({ dc_id: dcId }));
|
|
1602
|
+
const client = new _a(new _3_storage_js_1.StorageMemory(), this.apiId, this.apiHash, {
|
|
1497
1603
|
transportProvider: this.transportProvider,
|
|
1498
1604
|
appVersion: this.appVersion,
|
|
1499
1605
|
deviceModel: this.deviceModel,
|
|
@@ -1513,8 +1619,8 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1513
1619
|
const limit = chunkSize;
|
|
1514
1620
|
let offset = 0n;
|
|
1515
1621
|
while (true) {
|
|
1516
|
-
const file = await (client ?? this).invoke(new _2_tl_js_1.functions.
|
|
1517
|
-
if (file instanceof _2_tl_js_1.types.
|
|
1622
|
+
const file = await (client ?? this).invoke(new _2_tl_js_1.functions.upload.getFile({ location, offset, limit }));
|
|
1623
|
+
if (file instanceof _2_tl_js_1.types.upload.File) {
|
|
1518
1624
|
yield file.bytes;
|
|
1519
1625
|
if (file.bytes.length < limit) {
|
|
1520
1626
|
break;
|
|
@@ -1528,14 +1634,14 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1528
1634
|
}
|
|
1529
1635
|
}
|
|
1530
1636
|
}, getStickerSetName)](inputStickerSet, hash = 0) {
|
|
1531
|
-
const maybeStickerSetName = await this.storage.getStickerSetName(inputStickerSet.id, inputStickerSet.
|
|
1637
|
+
const maybeStickerSetName = await this.storage.getStickerSetName(inputStickerSet.id, inputStickerSet.access_hash);
|
|
1532
1638
|
if (maybeStickerSetName != null && Date.now() - maybeStickerSetName[1].getTime() < _4_constants_js_1.STICKER_SET_NAME_TTL) {
|
|
1533
1639
|
return maybeStickerSetName[0];
|
|
1534
1640
|
}
|
|
1535
1641
|
else {
|
|
1536
|
-
const stickerSet = await this.invoke(new _2_tl_js_1.functions.
|
|
1537
|
-
const name = stickerSet[_2_tl_js_1.as](_2_tl_js_1.types.
|
|
1538
|
-
await this.storage.updateStickerSetName(inputStickerSet.id, inputStickerSet.
|
|
1642
|
+
const stickerSet = await this.invoke(new _2_tl_js_1.functions.messages.getStickerSet({ stickerset: inputStickerSet, hash }));
|
|
1643
|
+
const name = stickerSet[_2_tl_js_1.as](_2_tl_js_1.types.messages.StickerSet).set.short_name;
|
|
1644
|
+
await this.storage.updateStickerSetName(inputStickerSet.id, inputStickerSet.access_hash, name);
|
|
1539
1645
|
return name;
|
|
1540
1646
|
}
|
|
1541
1647
|
}
|
|
@@ -1549,17 +1655,17 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1549
1655
|
* @returns The forwarded messages.
|
|
1550
1656
|
*/
|
|
1551
1657
|
async forwardMessages(from, to, messageIds, params) {
|
|
1552
|
-
const result = await this.invoke(new _2_tl_js_1.functions.
|
|
1553
|
-
|
|
1554
|
-
|
|
1658
|
+
const result = await this.invoke(new _2_tl_js_1.functions.messages.forwardMessages({
|
|
1659
|
+
from_peer: await this.getInputPeer(from),
|
|
1660
|
+
to_peer: await this.getInputPeer(to),
|
|
1555
1661
|
id: messageIds,
|
|
1556
|
-
|
|
1662
|
+
random_id: messageIds.map(() => (0, _1_utilities_js_1.getRandomId)()),
|
|
1557
1663
|
silent: params?.disableNotification || undefined,
|
|
1558
|
-
|
|
1664
|
+
top_msg_id: params?.messageThreadId,
|
|
1559
1665
|
noforwards: params?.disableNotification || undefined,
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1666
|
+
send_as: params?.sendAs ? await this.getInputPeer(params.sendAs) : undefined,
|
|
1667
|
+
drop_author: params?.dropSenderName || undefined,
|
|
1668
|
+
drop_media_captions: params?.dropCaption || undefined,
|
|
1563
1669
|
}));
|
|
1564
1670
|
return await __classPrivateFieldGet(this, _Client_instances, "m", _Client_updatesToMessages).call(this, to, result);
|
|
1565
1671
|
}
|
|
@@ -1581,7 +1687,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1581
1687
|
* @method
|
|
1582
1688
|
*/
|
|
1583
1689
|
async getMe() {
|
|
1584
|
-
const users = await this.invoke(new _2_tl_js_1.functions.
|
|
1690
|
+
const users = await this.invoke(new _2_tl_js_1.functions.users.getUsers({ id: [new _2_tl_js_1.types.InputUserSelf()] }));
|
|
1585
1691
|
if (users.length < 1) {
|
|
1586
1692
|
(0, _1_utilities_js_1.UNREACHABLE)();
|
|
1587
1693
|
}
|
|
@@ -1597,9 +1703,9 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1597
1703
|
*/
|
|
1598
1704
|
async answerCallbackQuery(id, params) {
|
|
1599
1705
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_assertBot).call(this, "answerCallbackQuery");
|
|
1600
|
-
await this.invoke(new _2_tl_js_1.functions.
|
|
1601
|
-
|
|
1602
|
-
|
|
1706
|
+
await this.invoke(new _2_tl_js_1.functions.messages.setBotCallbackAnswer({
|
|
1707
|
+
query_id: BigInt(id),
|
|
1708
|
+
cache_time: params?.cacheTime ?? 0,
|
|
1603
1709
|
message: params?.text,
|
|
1604
1710
|
alert: params?.alert ? true : undefined,
|
|
1605
1711
|
}));
|
|
@@ -1632,31 +1738,31 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1632
1738
|
answers,
|
|
1633
1739
|
question,
|
|
1634
1740
|
closed: params?.isClosed ? true : undefined,
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1741
|
+
close_date: params?.closeDate ? Math.floor(params.closeDate.getTime() / 1000) : undefined,
|
|
1742
|
+
close_period: params?.openPeriod ? params.openPeriod : undefined,
|
|
1743
|
+
multiple_choice: params?.allowMultipleAnswers ? true : undefined,
|
|
1744
|
+
public_voters: params?.isAnonymous === false ? true : undefined,
|
|
1639
1745
|
quiz: params?.type == "quiz" ? true : undefined,
|
|
1640
1746
|
});
|
|
1641
1747
|
const media = new _2_tl_js_1.types.InputMediaPoll({
|
|
1642
1748
|
poll,
|
|
1643
|
-
|
|
1749
|
+
correct_answers: params?.correctOptionIndex ? [new Uint8Array([params.correctOptionIndex])] : undefined,
|
|
1644
1750
|
solution,
|
|
1645
|
-
solutionEntities,
|
|
1751
|
+
solution_entities: solutionEntities,
|
|
1646
1752
|
});
|
|
1647
|
-
const result = await this.invoke(new _2_tl_js_1.functions.
|
|
1753
|
+
const result = await this.invoke(new _2_tl_js_1.functions.messages.sendMedia({
|
|
1648
1754
|
peer,
|
|
1649
|
-
randomId,
|
|
1755
|
+
random_id: randomId,
|
|
1650
1756
|
silent,
|
|
1651
1757
|
noforwards,
|
|
1652
|
-
replyMarkup,
|
|
1653
|
-
|
|
1654
|
-
sendAs,
|
|
1758
|
+
reply_markup: replyMarkup,
|
|
1759
|
+
reply_to: replyToMsgId !== undefined ? new _2_tl_js_1.types.InputReplyToMessage({ reply_to_msg_id: replyToMsgId, top_msg_id: topMsgId }) : undefined,
|
|
1760
|
+
send_as: sendAs,
|
|
1655
1761
|
media,
|
|
1656
1762
|
message: "",
|
|
1657
1763
|
}));
|
|
1658
1764
|
const message = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
|
|
1659
|
-
return __classPrivateFieldGet(
|
|
1765
|
+
return __classPrivateFieldGet(_a, _a, "m", _Client_assertMsgHas).call(_a, message, "poll");
|
|
1660
1766
|
}
|
|
1661
1767
|
/**
|
|
1662
1768
|
* Send a chat action.
|
|
@@ -1705,7 +1811,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1705
1811
|
default:
|
|
1706
1812
|
throw new Error("Invalid chat action: " + action);
|
|
1707
1813
|
}
|
|
1708
|
-
await this.invoke(new _2_tl_js_1.functions.
|
|
1814
|
+
await this.invoke(new _2_tl_js_1.functions.messages.setTyping({ peer: await this.getInputPeer(chatId), action: action_, top_msg_id: params?.messageThreadId }));
|
|
1709
1815
|
}
|
|
1710
1816
|
/**
|
|
1711
1817
|
* Upload a file.
|
|
@@ -1723,7 +1829,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1723
1829
|
dUpload("uploading " + (isBig ? "big " : "") + "file of size " + contents.length + " with chunk size of " + chunkSize);
|
|
1724
1830
|
const fileId = (0, _1_utilities_js_1.getRandomId)();
|
|
1725
1831
|
const name = params?.fileName ?? fileId.toString();
|
|
1726
|
-
const client = new
|
|
1832
|
+
const client = new _a(this.storage, this.apiId, this.apiHash, {
|
|
1727
1833
|
transportProvider: this.transportProvider,
|
|
1728
1834
|
appVersion: this.appVersion,
|
|
1729
1835
|
deviceModel: this.deviceModel,
|
|
@@ -1751,10 +1857,10 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1751
1857
|
continue main;
|
|
1752
1858
|
}
|
|
1753
1859
|
if (isBig) {
|
|
1754
|
-
await client.invoke(new _2_tl_js_1.functions.
|
|
1860
|
+
await client.invoke(new _2_tl_js_1.functions.upload.saveBigFilePart({ file_id: fileId, file_part: part, bytes, file_total_parts: partCount }));
|
|
1755
1861
|
}
|
|
1756
1862
|
else {
|
|
1757
|
-
await client.invoke(new _2_tl_js_1.functions.
|
|
1863
|
+
await client.invoke(new _2_tl_js_1.functions.upload.saveFilePart({ file_id: fileId, bytes, file_part: part }));
|
|
1758
1864
|
}
|
|
1759
1865
|
dUpload((part + 1) + " out of " + partCount + " chunks have been uploaded so far");
|
|
1760
1866
|
break chunk;
|
|
@@ -1795,7 +1901,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1795
1901
|
return new _2_tl_js_1.types.InputFileBig({ id: fileId, parts: contents.length / chunkSize, name });
|
|
1796
1902
|
}
|
|
1797
1903
|
else {
|
|
1798
|
-
return new _2_tl_js_1.types.InputFile({ id: fileId, name, parts: part,
|
|
1904
|
+
return new _2_tl_js_1.types.InputFile({ id: fileId, name, parts: part, md5_checksum: "" });
|
|
1799
1905
|
}
|
|
1800
1906
|
}
|
|
1801
1907
|
/**
|
|
@@ -1805,9 +1911,9 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1805
1911
|
* @param commands The commands to set.
|
|
1806
1912
|
*/
|
|
1807
1913
|
async setMyCommands(commands, params) {
|
|
1808
|
-
await this.invoke(new _2_tl_js_1.functions.
|
|
1914
|
+
await this.invoke(new _2_tl_js_1.functions.bots.setBotCommands({
|
|
1809
1915
|
commands: commands.map((v) => new _2_tl_js_1.types.BotCommand(v)),
|
|
1810
|
-
|
|
1916
|
+
lang_code: params?.languageCode ?? "",
|
|
1811
1917
|
scope: await (0, _3_types_js_1.botCommandScopeToTlObject)(params?.scope ?? { type: "default" }, this.getInputPeer.bind(this)),
|
|
1812
1918
|
}));
|
|
1813
1919
|
}
|
|
@@ -1815,8 +1921,8 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1815
1921
|
* Get the bot's commands in the given scope and/or language. Bot-only.
|
|
1816
1922
|
*/
|
|
1817
1923
|
async getMyCommands(params) {
|
|
1818
|
-
const commands_ = await this.invoke(new _2_tl_js_1.functions.
|
|
1819
|
-
|
|
1924
|
+
const commands_ = await this.invoke(new _2_tl_js_1.functions.bots.getBotCommands({
|
|
1925
|
+
lang_code: params?.languageCode ?? "",
|
|
1820
1926
|
scope: await (0, _3_types_js_1.botCommandScopeToTlObject)(params?.scope ?? { type: "default" }, this.getInputPeer.bind(this)),
|
|
1821
1927
|
}));
|
|
1822
1928
|
return commands_.map((v) => ({ command: v.command, description: v.description }));
|
|
@@ -1829,15 +1935,15 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1829
1935
|
* @param results The results to answer with.
|
|
1830
1936
|
*/
|
|
1831
1937
|
async answerInlineQuery(id, results, params) {
|
|
1832
|
-
await this.invoke(new _2_tl_js_1.functions.
|
|
1833
|
-
|
|
1938
|
+
await this.invoke(new _2_tl_js_1.functions.messages.setInlineBotResults({
|
|
1939
|
+
query_id: BigInt(id),
|
|
1834
1940
|
results: await Promise.all(results.map((v) => (0, _3_types_js_1.inlineQueryResultToTlObject)(v, __classPrivateFieldGet(this, _Client_instances, "m", _Client_parseText).bind(this), __classPrivateFieldGet(this, _Client_usernameResolver, "f").bind(this)))),
|
|
1835
|
-
|
|
1941
|
+
cache_time: params?.cacheTime ?? 300,
|
|
1836
1942
|
private: params?.isPersonal ? true : undefined,
|
|
1837
|
-
|
|
1838
|
-
|
|
1943
|
+
switch_webview: params?.button && params.button.webApp ? new _2_tl_js_1.types.InlineBotWebView({ text: params.button.text, url: params.button.webApp.url }) : undefined,
|
|
1944
|
+
switch_pm: params?.button && params.button.startParameter ? new _2_tl_js_1.types.InlineBotSwitchPM({ text: params.button.text, start_param: params.button.startParameter }) : undefined,
|
|
1839
1945
|
gallery: params?.isGallery ? true : undefined,
|
|
1840
|
-
|
|
1946
|
+
next_offset: params?.nextOffset,
|
|
1841
1947
|
}));
|
|
1842
1948
|
}
|
|
1843
1949
|
use(...middleware) {
|
|
@@ -1884,20 +1990,37 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1884
1990
|
}, ...middleawre);
|
|
1885
1991
|
}
|
|
1886
1992
|
command(commands, ...middleawre) {
|
|
1887
|
-
const
|
|
1993
|
+
const commands__ = typeof commands === "object" && "names" in commands ? commands.names : commands;
|
|
1994
|
+
const commands_ = Array.isArray(commands__) ? commands__ : [commands__];
|
|
1995
|
+
const prefixes_ = typeof commands === "object" && "prefixes" in commands ? commands.prefixes : (__classPrivateFieldGet(this, _Client_prefixes, "f") ?? []);
|
|
1996
|
+
const prefixes = Array.isArray(prefixes_) ? prefixes_ : [prefixes_];
|
|
1997
|
+
for (const left of prefixes) {
|
|
1998
|
+
for (const right of prefixes) {
|
|
1999
|
+
if (left == right) {
|
|
2000
|
+
continue;
|
|
2001
|
+
}
|
|
2002
|
+
if (left.startsWith(right) || right.startsWith(left)) {
|
|
2003
|
+
throw new Error("Intersecting prefixes");
|
|
2004
|
+
}
|
|
2005
|
+
}
|
|
2006
|
+
}
|
|
1888
2007
|
return this.on(["message", "text"]).filter((ctx) => {
|
|
1889
|
-
const
|
|
1890
|
-
if (
|
|
2008
|
+
const prefixes_ = prefixes.length == 0 ? [!ctx.me?.isBot ? "\\" : "/"] : prefixes;
|
|
2009
|
+
if (prefixes_.length == 0) {
|
|
2010
|
+
return false;
|
|
2011
|
+
}
|
|
2012
|
+
const cmd = ctx.message.text.split(/\s/, 1)[0];
|
|
2013
|
+
const prefix = prefixes_.find((v) => cmd.startsWith(v));
|
|
2014
|
+
if (prefix === undefined) {
|
|
1891
2015
|
return false;
|
|
1892
2016
|
}
|
|
1893
|
-
const cmd = ctx.message.text.slice(botCommand.offset, botCommand.offset + botCommand.length);
|
|
1894
2017
|
if (cmd.includes("@")) {
|
|
1895
|
-
const username = cmd.split("@")[1];
|
|
2018
|
+
const username = cmd.split("@", 2)[1];
|
|
1896
2019
|
if (username.toLowerCase() !== ctx.me.username?.toLowerCase()) {
|
|
1897
2020
|
return false;
|
|
1898
2021
|
}
|
|
1899
2022
|
}
|
|
1900
|
-
const command_ = cmd.split("@")[0].split(
|
|
2023
|
+
const command_ = cmd.split("@", 1)[0].split(prefix, 2)[1].toLowerCase();
|
|
1901
2024
|
for (const command of commands_) {
|
|
1902
2025
|
if (typeof command === "string" && (command.toLowerCase() == command_)) {
|
|
1903
2026
|
return true;
|
|
@@ -1916,7 +2039,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1916
2039
|
*/
|
|
1917
2040
|
async setMyDescription({ description, languageCode }) {
|
|
1918
2041
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_assertBot).call(this, "setMyDescription");
|
|
1919
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setMyInfo).call(this, { description,
|
|
2042
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setMyInfo).call(this, { description, lang_code: languageCode ?? "" });
|
|
1920
2043
|
}
|
|
1921
2044
|
/**
|
|
1922
2045
|
* Set the bot's name in the given language. Bot-only.
|
|
@@ -1925,7 +2048,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1925
2048
|
*/
|
|
1926
2049
|
async setMyName({ name, languageCode }) {
|
|
1927
2050
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_assertBot).call(this, "setMyName");
|
|
1928
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setMyInfo).call(this, { name,
|
|
2051
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setMyInfo).call(this, { name, lang_code: languageCode ?? "" });
|
|
1929
2052
|
}
|
|
1930
2053
|
/**
|
|
1931
2054
|
* Set the bot's short description in the given language. Bot-only.
|
|
@@ -1934,7 +2057,7 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1934
2057
|
*/
|
|
1935
2058
|
async setMyShortDescription({ shortDescription: about, languageCode }) {
|
|
1936
2059
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_assertBot).call(this, "setMyShortDescription");
|
|
1937
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setMyInfo).call(this, { about,
|
|
2060
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setMyInfo).call(this, { about, lang_code: languageCode ?? "" });
|
|
1938
2061
|
}
|
|
1939
2062
|
/**
|
|
1940
2063
|
* Get the bot's description in the given language. Bot-only.
|
|
@@ -1973,10 +2096,10 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
1973
2096
|
async deleteMessages(chatId, messageIds, params) {
|
|
1974
2097
|
const peer = await this.getInputPeer(chatId);
|
|
1975
2098
|
if (peer instanceof _2_tl_js_1.types.InputPeerChannel) {
|
|
1976
|
-
await this.invoke(new _2_tl_js_1.functions.
|
|
2099
|
+
await this.invoke(new _2_tl_js_1.functions.channels.deleteMessages({ channel: new _2_tl_js_1.types.InputChannel(peer), id: messageIds }));
|
|
1977
2100
|
}
|
|
1978
2101
|
else {
|
|
1979
|
-
await this.invoke(new _2_tl_js_1.functions.
|
|
2102
|
+
await this.invoke(new _2_tl_js_1.functions.messages.deleteMessages({ id: messageIds, revoke: params?.onlyForMe ? undefined : true }));
|
|
1980
2103
|
}
|
|
1981
2104
|
}
|
|
1982
2105
|
/**
|
|
@@ -2017,8 +2140,8 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
2017
2140
|
media = new _2_tl_js_1.types.InputMediaPhoto({
|
|
2018
2141
|
id: new _2_tl_js_1.types.InputPhoto({
|
|
2019
2142
|
id: fileId.params.mediaId,
|
|
2020
|
-
|
|
2021
|
-
|
|
2143
|
+
access_hash: fileId.params.accessHash,
|
|
2144
|
+
file_reference: fileId.params.fileReference,
|
|
2022
2145
|
}),
|
|
2023
2146
|
spoiler,
|
|
2024
2147
|
});
|
|
@@ -2046,20 +2169,20 @@ class Client extends _1_client_abstract_js_1.ClientAbstract {
|
|
|
2046
2169
|
const parseResult = caption_ !== undefined ? __classPrivateFieldGet(this, _Client_instances, "m", _Client_parseText).call(this, caption_, { parseMode: params?.parseMode, entities: params?.captionEntities }) : undefined;
|
|
2047
2170
|
const caption = parseResult === undefined ? undefined : parseResult[0];
|
|
2048
2171
|
const captionEntities = parseResult === undefined ? undefined : parseResult[1];
|
|
2049
|
-
const result = await this.invoke(new _2_tl_js_1.functions.
|
|
2172
|
+
const result = await this.invoke(new _2_tl_js_1.functions.messages.sendMedia({
|
|
2050
2173
|
peer,
|
|
2051
|
-
randomId,
|
|
2174
|
+
random_id: randomId,
|
|
2052
2175
|
silent,
|
|
2053
2176
|
noforwards,
|
|
2054
|
-
replyMarkup,
|
|
2055
|
-
|
|
2056
|
-
sendAs,
|
|
2177
|
+
reply_markup: replyMarkup,
|
|
2178
|
+
reply_to: replyToMsgId !== undefined ? new _2_tl_js_1.types.InputReplyToMessage({ reply_to_msg_id: replyToMsgId, top_msg_id: topMsgId }) : undefined,
|
|
2179
|
+
send_as: sendAs,
|
|
2057
2180
|
media,
|
|
2058
2181
|
message: caption ?? "",
|
|
2059
2182
|
entities: captionEntities,
|
|
2060
2183
|
}));
|
|
2061
2184
|
const message = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
|
|
2062
|
-
return __classPrivateFieldGet(
|
|
2185
|
+
return __classPrivateFieldGet(_a, _a, "m", _Client_assertMsgHas).call(_a, message, "photo");
|
|
2063
2186
|
}
|
|
2064
2187
|
}
|
|
2065
2188
|
exports.Client = Client;
|
|
@@ -2080,21 +2203,21 @@ async function _Client_handleUpdate(update) {
|
|
|
2080
2203
|
message: new _2_tl_js_1.types.Message({
|
|
2081
2204
|
out: update.out,
|
|
2082
2205
|
mentioned: update.mentioned,
|
|
2083
|
-
|
|
2206
|
+
media_unread: update.media_unread,
|
|
2084
2207
|
silent: update.silent,
|
|
2085
2208
|
id: update.id,
|
|
2086
|
-
|
|
2087
|
-
|
|
2209
|
+
from_id: update.out ? new _2_tl_js_1.types.PeerUser({ user_id: await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getSelfId).call(this).then(BigInt) }) : new _2_tl_js_1.types.PeerUser({ user_id: update.user_id }),
|
|
2210
|
+
peer_id: new _2_tl_js_1.types.PeerChat({ chat_id: update.user_id }),
|
|
2088
2211
|
message: update.message,
|
|
2089
2212
|
date: update.date,
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2213
|
+
fwd_from: update.fwd_from,
|
|
2214
|
+
via_bot_id: update.via_bot_id,
|
|
2215
|
+
reply_to: update.reply_to,
|
|
2093
2216
|
entities: update.entities,
|
|
2094
|
-
|
|
2217
|
+
ttl_period: update.ttl_period,
|
|
2095
2218
|
}),
|
|
2096
2219
|
pts: update.pts,
|
|
2097
|
-
|
|
2220
|
+
pts_count: update.pts_count,
|
|
2098
2221
|
});
|
|
2099
2222
|
}
|
|
2100
2223
|
else if (update instanceof _2_tl_js_1.types.UpdateShortChatMessage) {
|
|
@@ -2102,26 +2225,26 @@ async function _Client_handleUpdate(update) {
|
|
|
2102
2225
|
message: new _2_tl_js_1.types.Message({
|
|
2103
2226
|
out: update.out,
|
|
2104
2227
|
mentioned: update.mentioned,
|
|
2105
|
-
|
|
2228
|
+
media_unread: update.media_unread,
|
|
2106
2229
|
silent: update.silent,
|
|
2107
2230
|
id: update.id,
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2231
|
+
from_id: new _2_tl_js_1.types.PeerUser({ user_id: update.from_id }),
|
|
2232
|
+
peer_id: new _2_tl_js_1.types.PeerChat({ chat_id: update.chat_id }),
|
|
2233
|
+
fwd_from: update.fwd_from,
|
|
2234
|
+
via_bot_id: update.via_bot_id,
|
|
2235
|
+
reply_to: update.reply_to,
|
|
2113
2236
|
date: update.date,
|
|
2114
2237
|
message: update.message,
|
|
2115
2238
|
entities: update.entities,
|
|
2116
|
-
|
|
2239
|
+
ttl_period: update.ttl_period,
|
|
2117
2240
|
}),
|
|
2118
2241
|
pts: update.pts,
|
|
2119
|
-
|
|
2242
|
+
pts_count: update.pts_count,
|
|
2120
2243
|
});
|
|
2121
2244
|
}
|
|
2122
2245
|
if (update instanceof _2_tl_js_1.types.UpdateNewMessage || update instanceof _2_tl_js_1.types.UpdateNewMessage || update instanceof _2_tl_js_1.types.UpdateNewChannelMessage || update instanceof _2_tl_js_1.types.UpdateNewChannelMessage) {
|
|
2123
2246
|
if (update.message instanceof _2_tl_js_1.types.Message || update.message instanceof _2_tl_js_1.types.MessageService) {
|
|
2124
|
-
await this.storage.setMessage((0, _2_tl_js_1.peerToChatId)(update.message.
|
|
2247
|
+
await this.storage.setMessage((0, _2_tl_js_1.peerToChatId)(update.message.peer_id), update.message.id, update.message);
|
|
2125
2248
|
}
|
|
2126
2249
|
}
|
|
2127
2250
|
if (update instanceof _2_tl_js_1.types.UpdateNewMessage ||
|
|
@@ -2158,7 +2281,7 @@ async function _Client_handleUpdate(update) {
|
|
|
2158
2281
|
}
|
|
2159
2282
|
}
|
|
2160
2283
|
else if (update instanceof _2_tl_js_1.types.UpdateDeleteChannelMessages) {
|
|
2161
|
-
const chatId = (0, _2_tl_js_1.getChannelChatId)(update.
|
|
2284
|
+
const chatId = (0, _2_tl_js_1.getChannelChatId)(update.channel_id);
|
|
2162
2285
|
const deletedMessages = new Array();
|
|
2163
2286
|
for (const messageId of update.messages) {
|
|
2164
2287
|
const message = await this.storage.getMessage(chatId, messageId);
|
|
@@ -2190,7 +2313,7 @@ async function _Client_handleUpdate(update) {
|
|
|
2190
2313
|
}, _Client_setMyInfo =
|
|
2191
2314
|
//#endregion
|
|
2192
2315
|
async function _Client_setMyInfo(info) {
|
|
2193
|
-
await this.invoke(new _2_tl_js_1.functions.
|
|
2316
|
+
await this.invoke(new _2_tl_js_1.functions.bots.setBotInfo({ bot: new _2_tl_js_1.types.InputUserSelf(), ...info }));
|
|
2194
2317
|
}, _Client_getMyInfo = function _Client_getMyInfo(languageCode) {
|
|
2195
|
-
return this.invoke(new _2_tl_js_1.functions.
|
|
2318
|
+
return this.invoke(new _2_tl_js_1.functions.bots.getBotInfo({ bot: new _2_tl_js_1.types.InputUserSelf(), lang_code: languageCode ?? "" }));
|
|
2196
2319
|
};
|