@mtkruto/node 0.1.119 → 0.1.122
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/5_client.d.ts +20 -6
- package/esm/client/5_client.js +313 -256
- 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 +11 -4
- package/esm/tl/2_types.d.ts +11385 -6448
- package/esm/tl/2_types.js +16324 -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/{5_rpc_result.d.ts → 4_rpc_result.d.ts} +2 -1
- package/esm/tl/{5_rpc_result.js → 4_rpc_result.js} +4 -1
- package/esm/tl/6_message.d.ts +1 -1
- package/esm/tl/6_message.js +1 -1
- package/esm/tl/7_message_container.d.ts +2 -1
- package/esm/tl/7_message_container.js +4 -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/5_client.d.ts +20 -6
- package/script/client/5_client.js +312 -255
- 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 +12 -5
- package/script/tl/2_types.d.ts +11385 -6448
- package/script/tl/2_types.js +18033 -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/{5_rpc_result.d.ts → 4_rpc_result.d.ts} +2 -1
- package/script/tl/{5_rpc_result.js → 4_rpc_result.js} +3 -0
- package/script/tl/6_message.d.ts +1 -1
- package/script/tl/6_message.js +4 -4
- package/script/tl/7_message_container.d.ts +2 -1
- package/script/tl/7_message_container.js +3 -0
- 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/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/esm/client/5_client.js
CHANGED
|
@@ -9,10 +9,10 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
9
9
|
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");
|
|
10
10
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
11
|
};
|
|
12
|
-
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_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;
|
|
12
|
+
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;
|
|
13
13
|
import { debug, gunzip, Mutex } from "../0_deps.js";
|
|
14
14
|
import { bigIntFromBuffer, cleanObject, drop, getRandomBigInt, getRandomId, mod, mustPrompt, mustPromptOneOf, Queue, sha1, UNREACHABLE } from "../1_utilities.js";
|
|
15
|
-
import { as, functions, getChannelChatId, Message_, MessageContainer, peerToChatId, RPCResult, TLError, TLReader, types } from "../2_tl.js";
|
|
15
|
+
import { as, functions, getChannelChatId, Message_, MessageContainer, name, peerToChatId, RPCResult, TLError, TLReader, types } from "../2_tl.js";
|
|
16
16
|
import { StorageMemory } from "../3_storage.js";
|
|
17
17
|
import { botCommandScopeToTlObject, constructCallbackQuery, constructInlineQuery, constructMessage, constructUser, FileID, FileType, inlineQueryResultToTlObject, messageEntityToTlObject, replyMarkupToTlObject, ThumbnailSource } from "../3_types.js";
|
|
18
18
|
import { ACK_THRESHOLD, APP_VERSION, CHANNEL_DIFFERENCE_LIMIT_BOT, CHANNEL_DIFFERENCE_LIMIT_USER, DEVICE_MODEL, LANG_CODE, LANG_PACK, LAYER, MAX_CHANNEL_ID, MAX_CHAT_ID, STICKER_SET_NAME_TTL, SYSTEM_LANG_CODE, SYSTEM_VERSION, USERNAME_TTL, ZERO_CHANNEL_ID } from "../4_constants.js";
|
|
@@ -34,6 +34,7 @@ const getEntity = Symbol();
|
|
|
34
34
|
const getStickerSetName = Symbol();
|
|
35
35
|
export const handleMigrationError = Symbol();
|
|
36
36
|
const getMessageWithReply = Symbol();
|
|
37
|
+
const functionNamespaces = Object.entries(functions).filter(([, v]) => !(v instanceof Function)).map(([k]) => k);
|
|
37
38
|
export function skipInvoke() {
|
|
38
39
|
return (_ctx, next) => next();
|
|
39
40
|
}
|
|
@@ -121,6 +122,62 @@ export class Client extends ClientAbstract {
|
|
|
121
122
|
_Client_autoStart.set(this, void 0);
|
|
122
123
|
_Client_ignoreOutgoing.set(this, void 0);
|
|
123
124
|
_Client_prefixes.set(this, void 0);
|
|
125
|
+
_Client_namespaceProxies.set(this, (() => {
|
|
126
|
+
// deno-lint-ignore no-explicit-any
|
|
127
|
+
const proxies = {};
|
|
128
|
+
for (const name of functionNamespaces) {
|
|
129
|
+
const ns = functions[name];
|
|
130
|
+
proxies[name] = new Proxy({}, {
|
|
131
|
+
get: (_, key) => {
|
|
132
|
+
if (key in ns) {
|
|
133
|
+
// deno-lint-ignore no-explicit-any
|
|
134
|
+
const func = ns[key];
|
|
135
|
+
if (func instanceof Function) {
|
|
136
|
+
// deno-lint-ignore no-explicit-any
|
|
137
|
+
return (params) => {
|
|
138
|
+
// deno-lint-ignore ban-ts-comment
|
|
139
|
+
// @ts-ignore
|
|
140
|
+
return this.invoke(new func(params));
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
UNREACHABLE();
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
set() {
|
|
149
|
+
return true;
|
|
150
|
+
},
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
return proxies;
|
|
154
|
+
})());
|
|
155
|
+
Object.defineProperty(this, "api", {
|
|
156
|
+
enumerable: true,
|
|
157
|
+
configurable: true,
|
|
158
|
+
writable: true,
|
|
159
|
+
value: new Proxy({}, {
|
|
160
|
+
get: (_, key) => {
|
|
161
|
+
if (key in functions) {
|
|
162
|
+
const func = functions[key];
|
|
163
|
+
if (func instanceof Function) {
|
|
164
|
+
// deno-lint-ignore no-explicit-any
|
|
165
|
+
return (params) => {
|
|
166
|
+
// deno-lint-ignore ban-ts-comment
|
|
167
|
+
// @ts-ignore
|
|
168
|
+
return this.invoke(new func(params));
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
return __classPrivateFieldGet(this, _Client_namespaceProxies, "f")[key];
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
set() {
|
|
177
|
+
return true;
|
|
178
|
+
},
|
|
179
|
+
})
|
|
180
|
+
});
|
|
124
181
|
_Client_constructContext.set(this, async (update) => {
|
|
125
182
|
const msg = update.message ?? update.editedMessage ?? update.callbackQuery?.message;
|
|
126
183
|
const mustGetMsg = () => {
|
|
@@ -283,7 +340,7 @@ export class Client extends ClientAbstract {
|
|
|
283
340
|
_Client_lastGetMe.set(this, null);
|
|
284
341
|
_Client_usernameResolver.set(this, async (v) => {
|
|
285
342
|
const inputPeer = await this.getInputPeer(v).then((v) => v[as](types.InputPeerUser));
|
|
286
|
-
return new types.InputUser(
|
|
343
|
+
return new types.InputUser(inputPeer);
|
|
287
344
|
});
|
|
288
345
|
//#region Composer
|
|
289
346
|
_Client_handle.set(this, skip);
|
|
@@ -408,7 +465,7 @@ export class Client extends ClientAbstract {
|
|
|
408
465
|
release();
|
|
409
466
|
}
|
|
410
467
|
}
|
|
411
|
-
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_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) {
|
|
468
|
+
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) {
|
|
412
469
|
__classPrivateFieldGet(this, _Client_handleUpdateQueue, "f").add(async () => {
|
|
413
470
|
await __classPrivateFieldGet(this, _Client_handle, "f").call(this, await __classPrivateFieldGet(this, _Client_constructContext, "f").call(this, { connectionState }), resolve);
|
|
414
471
|
});
|
|
@@ -425,7 +482,7 @@ export class Client extends ClientAbstract {
|
|
|
425
482
|
throw new Error(`${source}: not a bot client`);
|
|
426
483
|
}
|
|
427
484
|
}, _Client_fetchState = async function _Client_fetchState(source) {
|
|
428
|
-
const state = await this.invoke(new functions.
|
|
485
|
+
const state = await this.invoke(new functions.updates.getState());
|
|
429
486
|
__classPrivateFieldSet(this, _Client_updateState, state, "f");
|
|
430
487
|
d("state fetched [%s]", source);
|
|
431
488
|
}, handleMigrationError)](err) {
|
|
@@ -473,7 +530,7 @@ export class Client extends ClientAbstract {
|
|
|
473
530
|
params = { phone: () => mustPrompt("Phone number:"), code: () => mustPrompt("Verification code:"), password: () => mustPrompt("Password:") };
|
|
474
531
|
}
|
|
475
532
|
}
|
|
476
|
-
dAuth("authorizing with %s", typeof params === "string" ? "bot token" : params instanceof types.
|
|
533
|
+
dAuth("authorizing with %s", typeof params === "string" ? "bot token" : params instanceof types.auth.ExportedAuthorization ? "exported authorization" : "AuthorizeUserParams");
|
|
477
534
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initConnection).call(this);
|
|
478
535
|
try {
|
|
479
536
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_fetchState).call(this, "authorize");
|
|
@@ -489,8 +546,8 @@ export class Client extends ClientAbstract {
|
|
|
489
546
|
if (typeof params === "string") {
|
|
490
547
|
while (true) {
|
|
491
548
|
try {
|
|
492
|
-
const auth = await this.invoke(new functions.
|
|
493
|
-
__classPrivateFieldSet(this, _Client_selfId, Number(auth[as](types.
|
|
549
|
+
const auth = await this.invoke(new functions.auth.importBotAuthorization({ api_id: this.apiId, api_hash: this.apiHash, bot_auth_token: params, flags: 0 }));
|
|
550
|
+
__classPrivateFieldSet(this, _Client_selfId, Number(auth[as](types.auth.Authorization).user.id), "f");
|
|
494
551
|
await this.storage.setAccountType("bot");
|
|
495
552
|
break;
|
|
496
553
|
}
|
|
@@ -510,8 +567,8 @@ export class Client extends ClientAbstract {
|
|
|
510
567
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_fetchState).call(this, "authorize");
|
|
511
568
|
return;
|
|
512
569
|
}
|
|
513
|
-
if (params instanceof types.
|
|
514
|
-
await this.invoke(new functions.
|
|
570
|
+
if (params instanceof types.auth.ExportedAuthorization) {
|
|
571
|
+
await this.invoke(new functions.auth.importAuthorization({ id: params.id, bytes: params.bytes }));
|
|
515
572
|
dAuth("authorization imported");
|
|
516
573
|
return;
|
|
517
574
|
}
|
|
@@ -522,12 +579,12 @@ export class Client extends ClientAbstract {
|
|
|
522
579
|
while (true) {
|
|
523
580
|
try {
|
|
524
581
|
phone = typeof params.phone === "string" ? params.phone : await params.phone();
|
|
525
|
-
const sendCode = () => this.invoke(new functions.
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
582
|
+
const sendCode = () => this.invoke(new functions.auth.sendCode({
|
|
583
|
+
phone_number: phone,
|
|
584
|
+
api_id: this.apiId,
|
|
585
|
+
api_hash: this.apiHash,
|
|
529
586
|
settings: new types.CodeSettings(),
|
|
530
|
-
})).then((v) => v[as](types.
|
|
587
|
+
})).then((v) => v[as](types.auth.SentCode));
|
|
531
588
|
try {
|
|
532
589
|
sentCode = await sendCode();
|
|
533
590
|
}
|
|
@@ -557,12 +614,12 @@ export class Client extends ClientAbstract {
|
|
|
557
614
|
code: while (true) {
|
|
558
615
|
const code = typeof params.code === "string" ? params.code : await params.code();
|
|
559
616
|
try {
|
|
560
|
-
const auth = await this.invoke(new functions.
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
617
|
+
const auth = await this.invoke(new functions.auth.signIn({
|
|
618
|
+
phone_number: phone,
|
|
619
|
+
phone_code: code,
|
|
620
|
+
phone_code_hash: sentCode.phone_code_hash,
|
|
564
621
|
}));
|
|
565
|
-
__classPrivateFieldSet(this, _Client_selfId, Number(auth[as](types.
|
|
622
|
+
__classPrivateFieldSet(this, _Client_selfId, Number(auth[as](types.auth.Authorization).user.id), "f");
|
|
566
623
|
await this.storage.setAccountType("user");
|
|
567
624
|
dAuth("authorized as user");
|
|
568
625
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateAuthorizationState).call(this, true);
|
|
@@ -570,7 +627,7 @@ export class Client extends ClientAbstract {
|
|
|
570
627
|
return;
|
|
571
628
|
}
|
|
572
629
|
catch (err_) {
|
|
573
|
-
if (err_ instanceof types.
|
|
630
|
+
if (err_ instanceof types.Rpc_error && err_.error_message == "PHONE_CODE_INVALID") {
|
|
574
631
|
continue code;
|
|
575
632
|
}
|
|
576
633
|
else {
|
|
@@ -583,15 +640,15 @@ export class Client extends ClientAbstract {
|
|
|
583
640
|
throw err;
|
|
584
641
|
}
|
|
585
642
|
password: while (true) {
|
|
586
|
-
const ap = await this.invoke(new functions.
|
|
587
|
-
if (!(ap.
|
|
588
|
-
throw new Error(`Handling ${ap.
|
|
643
|
+
const ap = await this.invoke(new functions.account.getPassword());
|
|
644
|
+
if (!(ap.current_algo instanceof types.PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow)) {
|
|
645
|
+
throw new Error(`Handling ${ap.current_algo?.[name]} not implemented`);
|
|
589
646
|
}
|
|
590
647
|
try {
|
|
591
648
|
const password = typeof params.password === "string" ? params.password : await params.password(ap.hint ?? null);
|
|
592
649
|
const input = await checkPassword(password, ap);
|
|
593
|
-
const auth = await this.invoke(new functions.
|
|
594
|
-
__classPrivateFieldSet(this, _Client_selfId, Number(auth[as](types.
|
|
650
|
+
const auth = await this.invoke(new functions.auth.checkPassword({ password: input }));
|
|
651
|
+
__classPrivateFieldSet(this, _Client_selfId, Number(auth[as](types.auth.Authorization).user.id), "f");
|
|
595
652
|
await this.storage.setAccountType("user");
|
|
596
653
|
dAuth("authorized as user");
|
|
597
654
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateAuthorizationState).call(this, true);
|
|
@@ -653,36 +710,36 @@ export class Client extends ClientAbstract {
|
|
|
653
710
|
}
|
|
654
711
|
}
|
|
655
712
|
async getUserAccessHash(userId) {
|
|
656
|
-
const users = await this.invoke(new functions.
|
|
657
|
-
return users[0]?.[as](types.User).
|
|
713
|
+
const users = await this.invoke(new functions.users.getUsers({ id: [new types.InputUser({ user_id: userId, access_hash: 0n })] }));
|
|
714
|
+
return users[0]?.[as](types.User).access_hash ?? 0n;
|
|
658
715
|
}
|
|
659
716
|
async getInputPeer(id) {
|
|
660
717
|
const inputPeer = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getInputPeerInner).call(this, id);
|
|
661
|
-
if ((inputPeer instanceof types.InputPeerUser || inputPeer instanceof types.InputPeerChannel && inputPeer.
|
|
662
|
-
if ("
|
|
663
|
-
inputPeer.
|
|
718
|
+
if ((inputPeer instanceof types.InputPeerUser || inputPeer instanceof types.InputPeerChannel && inputPeer.access_hash == 0n) && await this.storage.getAccountType() == "bot") {
|
|
719
|
+
if ("channel_id" in inputPeer) {
|
|
720
|
+
inputPeer.access_hash = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getChannelAccessHash).call(this, inputPeer.channel_id);
|
|
664
721
|
}
|
|
665
722
|
else {
|
|
666
|
-
inputPeer.
|
|
667
|
-
await this.storage.setUserAccessHash(inputPeer.
|
|
723
|
+
inputPeer.access_hash = await this.getUserAccessHash(inputPeer.user_id);
|
|
724
|
+
await this.storage.setUserAccessHash(inputPeer.user_id, inputPeer.access_hash);
|
|
668
725
|
}
|
|
669
726
|
}
|
|
670
727
|
return inputPeer;
|
|
671
728
|
}
|
|
672
729
|
[(_Client_initConnection = async function _Client_initConnection() {
|
|
673
730
|
if (!__classPrivateFieldGet(this, _Client_connectionInited, "f")) {
|
|
674
|
-
await this.invoke(new functions.
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
query: new functions.
|
|
731
|
+
await this.invoke(new functions.initConnection({
|
|
732
|
+
api_id: this.apiId,
|
|
733
|
+
app_version: this.appVersion,
|
|
734
|
+
device_model: this.deviceModel,
|
|
735
|
+
lang_code: this.langCode,
|
|
736
|
+
lang_pack: this.langPack,
|
|
737
|
+
query: new functions.invokeWithLayer({
|
|
681
738
|
layer: LAYER,
|
|
682
|
-
query: new functions.
|
|
739
|
+
query: new functions.help.getConfig(),
|
|
683
740
|
}),
|
|
684
|
-
|
|
685
|
-
|
|
741
|
+
system_lang_code: this.systemLangCode,
|
|
742
|
+
system_version: this.systemVersion,
|
|
686
743
|
}));
|
|
687
744
|
__classPrivateFieldSet(this, _Client_connectionInited, true, "f");
|
|
688
745
|
d("connection inited");
|
|
@@ -704,7 +761,7 @@ export class Client extends ClientAbstract {
|
|
|
704
761
|
while (this.connected) {
|
|
705
762
|
try {
|
|
706
763
|
if (__classPrivateFieldGet(this, _Client_toAcknowledge, "f").size >= ACK_THRESHOLD) {
|
|
707
|
-
await this.send(new types.
|
|
764
|
+
await this.send(new types.Msgs_ack({ msg_ids: [...__classPrivateFieldGet(this, _Client_toAcknowledge, "f")] }));
|
|
708
765
|
__classPrivateFieldGet(this, _Client_toAcknowledge, "f").clear();
|
|
709
766
|
}
|
|
710
767
|
const buffer = await this.transport.transport.receive();
|
|
@@ -720,33 +777,33 @@ export class Client extends ClientAbstract {
|
|
|
720
777
|
const messages = decrypted instanceof MessageContainer ? decrypted.messages : [decrypted];
|
|
721
778
|
for (const message of messages) {
|
|
722
779
|
let body = message.body;
|
|
723
|
-
if (body instanceof types.
|
|
724
|
-
body = new TLReader(gunzip(body.
|
|
780
|
+
if (body instanceof types.Gzip_packed) {
|
|
781
|
+
body = new TLReader(gunzip(body.packed_data)).readObject();
|
|
725
782
|
}
|
|
726
|
-
dRecv("received %s", body.constructor.name);
|
|
727
|
-
if (body instanceof types.
|
|
783
|
+
dRecv("received %s", (typeof body === "object" && name in body) ? body[name] : body.constructor.name);
|
|
784
|
+
if (body instanceof types._Updates || body instanceof types._Update) {
|
|
728
785
|
__classPrivateFieldGet(this, _Client_processUpdatesQueue, "f").add(() => __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, body, true));
|
|
729
786
|
}
|
|
730
|
-
else if (body instanceof types.
|
|
731
|
-
__classPrivateFieldGet(this, _Client_state, "f").salt = body.
|
|
787
|
+
else if (body instanceof types.New_session_created) {
|
|
788
|
+
__classPrivateFieldGet(this, _Client_state, "f").salt = body.server_salt;
|
|
732
789
|
await this.storage.setServerSalt(__classPrivateFieldGet(this, _Client_state, "f").salt);
|
|
733
790
|
}
|
|
734
791
|
else if (message.body instanceof RPCResult) {
|
|
735
792
|
let result = message.body.result;
|
|
736
|
-
if (result instanceof types.
|
|
737
|
-
result = new TLReader(gunzip(result.
|
|
793
|
+
if (result instanceof types.Gzip_packed) {
|
|
794
|
+
result = new TLReader(gunzip(result.packed_data)).readObject();
|
|
738
795
|
}
|
|
739
|
-
if (result instanceof types.
|
|
740
|
-
dRecv("RPCResult: %d %s", result.
|
|
796
|
+
if (result instanceof types.Rpc_error) {
|
|
797
|
+
dRecv("RPCResult: %d %s", result.error_code, result.error_message);
|
|
741
798
|
}
|
|
742
799
|
else {
|
|
743
|
-
dRecv("RPCResult: %s", result.constructor.name);
|
|
800
|
+
dRecv("RPCResult: %s", (typeof result === "object" && name in result) ? result[name] : result.constructor.name);
|
|
744
801
|
}
|
|
745
802
|
const messageId = message.body.messageId;
|
|
746
803
|
const resolvePromise = () => {
|
|
747
804
|
const promise = __classPrivateFieldGet(this, _Client_promises, "f").get(messageId);
|
|
748
805
|
if (promise) {
|
|
749
|
-
if (result instanceof types.
|
|
806
|
+
if (result instanceof types.Rpc_error) {
|
|
750
807
|
promise.reject(upgradeInstance(result));
|
|
751
808
|
}
|
|
752
809
|
else {
|
|
@@ -755,7 +812,7 @@ export class Client extends ClientAbstract {
|
|
|
755
812
|
__classPrivateFieldGet(this, _Client_promises, "f").delete(messageId);
|
|
756
813
|
}
|
|
757
814
|
};
|
|
758
|
-
if (result instanceof types.
|
|
815
|
+
if (result instanceof types._Updates || result instanceof types._Update) {
|
|
759
816
|
__classPrivateFieldGet(this, _Client_processUpdatesQueue, "f").add(async () => {
|
|
760
817
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, result, true);
|
|
761
818
|
resolvePromise();
|
|
@@ -767,20 +824,20 @@ export class Client extends ClientAbstract {
|
|
|
767
824
|
}
|
|
768
825
|
}
|
|
769
826
|
else if (message.body instanceof types.Pong) {
|
|
770
|
-
const promise = __classPrivateFieldGet(this, _Client_promises, "f").get(message.body.
|
|
827
|
+
const promise = __classPrivateFieldGet(this, _Client_promises, "f").get(message.body.msg_id);
|
|
771
828
|
if (promise) {
|
|
772
829
|
promise.resolve(message.body);
|
|
773
|
-
__classPrivateFieldGet(this, _Client_promises, "f").delete(message.body.
|
|
830
|
+
__classPrivateFieldGet(this, _Client_promises, "f").delete(message.body.msg_id);
|
|
774
831
|
}
|
|
775
832
|
}
|
|
776
|
-
else if (message.body instanceof types.
|
|
833
|
+
else if (message.body instanceof types.Bad_server_salt) {
|
|
777
834
|
d("server salt reassigned");
|
|
778
|
-
__classPrivateFieldGet(this, _Client_state, "f").salt = message.body.
|
|
835
|
+
__classPrivateFieldGet(this, _Client_state, "f").salt = message.body.new_server_salt;
|
|
779
836
|
await this.storage.setServerSalt(__classPrivateFieldGet(this, _Client_state, "f").salt);
|
|
780
|
-
const promise = __classPrivateFieldGet(this, _Client_promises, "f").get(message.body.
|
|
837
|
+
const promise = __classPrivateFieldGet(this, _Client_promises, "f").get(message.body.bad_msg_id);
|
|
781
838
|
if (promise) {
|
|
782
839
|
promise.resolve(message.body);
|
|
783
|
-
__classPrivateFieldGet(this, _Client_promises, "f").delete(message.body.
|
|
840
|
+
__classPrivateFieldGet(this, _Client_promises, "f").delete(message.body.bad_msg_id);
|
|
784
841
|
}
|
|
785
842
|
}
|
|
786
843
|
__classPrivateFieldGet(this, _Client_toAcknowledge, "f").add(message.id);
|
|
@@ -811,7 +868,7 @@ export class Client extends ClientAbstract {
|
|
|
811
868
|
while (this.connected) {
|
|
812
869
|
await new Promise((r) => setTimeout(r, __classPrivateFieldGet(this, _Client_pingInterval, "f")));
|
|
813
870
|
try {
|
|
814
|
-
await this.invoke(new functions.
|
|
871
|
+
await this.invoke(new functions.ping_delay_disconnect({ ping_id: getRandomBigInt(8, true, false), disconnect_delay: __classPrivateFieldGet(this, _Client_pingInterval, "f") + 15 }));
|
|
815
872
|
}
|
|
816
873
|
catch (err) {
|
|
817
874
|
d("ping loop error: %o", err);
|
|
@@ -833,18 +890,18 @@ export class Client extends ClientAbstract {
|
|
|
833
890
|
while (true) {
|
|
834
891
|
try {
|
|
835
892
|
let seqNo = __classPrivateFieldGet(this, _Client_state, "f").seqNo * 2;
|
|
836
|
-
if (!(function_ instanceof functions.
|
|
893
|
+
if (!(function_ instanceof functions.ping) && !(function_ instanceof types.Msgs_ack)) {
|
|
837
894
|
seqNo++;
|
|
838
895
|
__classPrivateFieldGet(this, _Client_state, "f").seqNo++;
|
|
839
896
|
}
|
|
840
897
|
const messageId = __classPrivateFieldSet(this, _Client_lastMsgId, getMessageId(__classPrivateFieldGet(this, _Client_lastMsgId, "f")), "f");
|
|
841
898
|
const message = new Message_(messageId, seqNo, function_);
|
|
842
899
|
await this.transport.transport.send(await 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")));
|
|
843
|
-
d("invoked %s", function_
|
|
900
|
+
d("invoked %s", function_[name]);
|
|
844
901
|
if (noWait) {
|
|
845
902
|
__classPrivateFieldGet(this, _Client_promises, "f").set(message.id, {
|
|
846
903
|
resolve: (result) => {
|
|
847
|
-
if (result instanceof types.
|
|
904
|
+
if (result instanceof types.Bad_server_salt) {
|
|
848
905
|
drop(this.invoke(function_, true));
|
|
849
906
|
}
|
|
850
907
|
},
|
|
@@ -864,7 +921,7 @@ export class Client extends ClientAbstract {
|
|
|
864
921
|
}
|
|
865
922
|
throw err;
|
|
866
923
|
}
|
|
867
|
-
if (result instanceof types.
|
|
924
|
+
if (result instanceof types.Bad_server_salt) {
|
|
868
925
|
return await this.invoke(function_);
|
|
869
926
|
}
|
|
870
927
|
else {
|
|
@@ -886,9 +943,9 @@ export class Client extends ClientAbstract {
|
|
|
886
943
|
}
|
|
887
944
|
}, _Client_processChats = async function _Client_processChats(chats) {
|
|
888
945
|
for (const chat of chats) {
|
|
889
|
-
if (chat instanceof types.Channel && chat.
|
|
946
|
+
if (chat instanceof types.Channel && chat.access_hash) {
|
|
890
947
|
await this.storage.setEntity(chat);
|
|
891
|
-
await this.storage.setChannelAccessHash(chat.id, chat.
|
|
948
|
+
await this.storage.setChannelAccessHash(chat.id, chat.access_hash);
|
|
892
949
|
if (chat.username) {
|
|
893
950
|
await this.storage.updateUsernames("channel", chat.id, [chat.username]);
|
|
894
951
|
}
|
|
@@ -902,9 +959,9 @@ export class Client extends ClientAbstract {
|
|
|
902
959
|
}
|
|
903
960
|
}, _Client_processUsers = async function _Client_processUsers(users) {
|
|
904
961
|
for (const user of users) {
|
|
905
|
-
if (user instanceof types.User && user.
|
|
962
|
+
if (user instanceof types.User && user.access_hash) {
|
|
906
963
|
await this.storage.setEntity(user);
|
|
907
|
-
await this.storage.setUserAccessHash(user.id, user.
|
|
964
|
+
await this.storage.setUserAccessHash(user.id, user.access_hash);
|
|
908
965
|
if (user.username) {
|
|
909
966
|
await this.storage.updateUsernames("user", user.id, [user.username]);
|
|
910
967
|
}
|
|
@@ -933,7 +990,7 @@ export class Client extends ClientAbstract {
|
|
|
933
990
|
if (updates_ instanceof types.UpdatesCombined || updates_ instanceof types.Updates) {
|
|
934
991
|
updates = updates_.updates;
|
|
935
992
|
const seq = updates_.seq;
|
|
936
|
-
const seqStart = "
|
|
993
|
+
const seqStart = "seq_start" in updates_ ? updates_.seq_start : updates_.seq;
|
|
937
994
|
if (checkGap) {
|
|
938
995
|
if (seqStart == 0) {
|
|
939
996
|
checkGap = false;
|
|
@@ -973,7 +1030,7 @@ export class Client extends ClientAbstract {
|
|
|
973
1030
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_recoverUpdateGap).call(this, "updatesTooLong");
|
|
974
1031
|
return;
|
|
975
1032
|
}
|
|
976
|
-
else if (updates_ instanceof types.
|
|
1033
|
+
else if (updates_ instanceof types._Update) {
|
|
977
1034
|
updates = [updates_];
|
|
978
1035
|
}
|
|
979
1036
|
else {
|
|
@@ -992,11 +1049,11 @@ export class Client extends ClientAbstract {
|
|
|
992
1049
|
continue;
|
|
993
1050
|
}
|
|
994
1051
|
if (checkGap) {
|
|
995
|
-
await this.checkGap(update.pts, update.
|
|
1052
|
+
await this.checkGap(update.pts, update.pts_count);
|
|
996
1053
|
}
|
|
997
1054
|
localState ??= await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getLocalState).call(this);
|
|
998
1055
|
originalPts ??= localState.pts;
|
|
999
|
-
if (localState.pts + update.
|
|
1056
|
+
if (localState.pts + update.pts_count > update.pts) {
|
|
1000
1057
|
updates = updates.filter((v) => v != update);
|
|
1001
1058
|
}
|
|
1002
1059
|
else {
|
|
@@ -1007,8 +1064,8 @@ export class Client extends ClientAbstract {
|
|
|
1007
1064
|
if (update.pts == 0) {
|
|
1008
1065
|
continue;
|
|
1009
1066
|
}
|
|
1010
|
-
const ptsCount = update.
|
|
1011
|
-
const channelId = update instanceof types.UpdateNewChannelMessage || update instanceof types.UpdateEditChannelMessage ? update.message.
|
|
1067
|
+
const ptsCount = update.pts_count;
|
|
1068
|
+
const channelId = update instanceof types.UpdateNewChannelMessage || update instanceof types.UpdateEditChannelMessage ? update.message.peer_id[as](types.PeerChannel).channel_id : update.channel_id;
|
|
1012
1069
|
if (checkGap) {
|
|
1013
1070
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_checkChannelGap).call(this, channelId, update.pts, ptsCount);
|
|
1014
1071
|
}
|
|
@@ -1043,12 +1100,12 @@ export class Client extends ClientAbstract {
|
|
|
1043
1100
|
}
|
|
1044
1101
|
else if (update instanceof types.UpdateChannelTooLong) {
|
|
1045
1102
|
if (update.pts != undefined) {
|
|
1046
|
-
await this.storage.setChannelPts(update.
|
|
1103
|
+
await this.storage.setChannelPts(update.channel_id, update.pts);
|
|
1047
1104
|
}
|
|
1048
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_recoverChannelUpdateGap).call(this, update.
|
|
1105
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_recoverChannelUpdateGap).call(this, update.channel_id, "updateChannelTooLong");
|
|
1049
1106
|
}
|
|
1050
1107
|
else if (update instanceof types.UpdateUserName) {
|
|
1051
|
-
await this.storage.updateUsernames("user", update.
|
|
1108
|
+
await this.storage.updateUsernames("user", update.user_id, update.usernames.map((v) => v.username));
|
|
1052
1109
|
}
|
|
1053
1110
|
else if (update instanceof types.UpdatePtsChanged) {
|
|
1054
1111
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_fetchState).call(this, "updatePtsChanged");
|
|
@@ -1064,18 +1121,18 @@ export class Client extends ClientAbstract {
|
|
|
1064
1121
|
}
|
|
1065
1122
|
else if (isChannelPtsUpdate(update)) {
|
|
1066
1123
|
let channelId = null;
|
|
1067
|
-
if ("
|
|
1068
|
-
channelId = update.
|
|
1124
|
+
if ("channel_id" in update) {
|
|
1125
|
+
channelId = update.channel_id;
|
|
1069
1126
|
}
|
|
1070
|
-
else if ("
|
|
1071
|
-
channelId = update.message.
|
|
1127
|
+
else if ("peer_id" in update.message && update.message.peer_id !== undefined && "channel_id" in update.message.peer_id) {
|
|
1128
|
+
channelId = update.message.peer_id.channel_id;
|
|
1072
1129
|
}
|
|
1073
1130
|
if (channelId != null) {
|
|
1074
1131
|
await this.storage.setChannelPts(channelId, update.pts);
|
|
1075
1132
|
}
|
|
1076
1133
|
}
|
|
1077
1134
|
/// If there were any Update, they will be passed to the update handling queue.
|
|
1078
|
-
if (update instanceof types.
|
|
1135
|
+
if (update instanceof types._Update) {
|
|
1079
1136
|
updatesToHandle.push(update);
|
|
1080
1137
|
}
|
|
1081
1138
|
}
|
|
@@ -1117,34 +1174,34 @@ export class Client extends ClientAbstract {
|
|
|
1117
1174
|
try {
|
|
1118
1175
|
let state = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getLocalState).call(this);
|
|
1119
1176
|
while (true) {
|
|
1120
|
-
const difference = await this.invoke(new functions.
|
|
1121
|
-
if (difference instanceof types.
|
|
1177
|
+
const difference = await this.invoke(new functions.updates.getDifference({ pts: state.pts, date: state.date, qts: state.qts ?? 0 }));
|
|
1178
|
+
if (difference instanceof types.updates.Difference || difference instanceof types.updates.DifferenceSlice) {
|
|
1122
1179
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processChats).call(this, difference.chats);
|
|
1123
1180
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUsers).call(this, difference.users);
|
|
1124
|
-
for (const message of difference.
|
|
1125
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, new types.UpdateNewMessage({ message, pts: 0,
|
|
1181
|
+
for (const message of difference.new_messages) {
|
|
1182
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, new types.UpdateNewMessage({ message, pts: 0, pts_count: 0 }), false);
|
|
1126
1183
|
}
|
|
1127
|
-
for (const update of difference.
|
|
1184
|
+
for (const update of difference.other_updates) {
|
|
1128
1185
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, update, false);
|
|
1129
1186
|
}
|
|
1130
|
-
if (difference instanceof types.
|
|
1187
|
+
if (difference instanceof types.updates.Difference) {
|
|
1131
1188
|
await this.storage.setState(difference.state);
|
|
1132
1189
|
dGap("recovered from update gap");
|
|
1133
1190
|
break;
|
|
1134
1191
|
}
|
|
1135
|
-
else if (difference instanceof types.
|
|
1136
|
-
state = difference.
|
|
1192
|
+
else if (difference instanceof types.updates.DifferenceSlice) {
|
|
1193
|
+
state = difference.intermediate_state;
|
|
1137
1194
|
}
|
|
1138
1195
|
else {
|
|
1139
1196
|
UNREACHABLE();
|
|
1140
1197
|
}
|
|
1141
1198
|
}
|
|
1142
|
-
else if (difference instanceof types.
|
|
1199
|
+
else if (difference instanceof types.updates.DifferenceTooLong) {
|
|
1143
1200
|
await this.storage.deleteMessages();
|
|
1144
1201
|
state.pts = difference.pts;
|
|
1145
1202
|
dGap("received differenceTooLong");
|
|
1146
1203
|
}
|
|
1147
|
-
else if (difference instanceof types.
|
|
1204
|
+
else if (difference instanceof types.updates.DifferenceEmpty) {
|
|
1148
1205
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setUpdateStateDate).call(this, difference.date);
|
|
1149
1206
|
dGap("there was no update gap");
|
|
1150
1207
|
break;
|
|
@@ -1162,33 +1219,33 @@ export class Client extends ClientAbstract {
|
|
|
1162
1219
|
const pts_ = await this.storage.getChannelPts(channelId);
|
|
1163
1220
|
let pts = pts_ == null ? 1 : pts_;
|
|
1164
1221
|
while (true) {
|
|
1165
|
-
const {
|
|
1166
|
-
const difference = await this.invoke(new functions.
|
|
1222
|
+
const { access_hash } = await this.getInputPeer(ZERO_CHANNEL_ID + -Number(channelId)).then((v) => v[as](types.InputPeerChannel));
|
|
1223
|
+
const difference = await this.invoke(new functions.updates.getChannelDifference({
|
|
1167
1224
|
pts,
|
|
1168
|
-
channel: new types.InputChannel({ channelId,
|
|
1225
|
+
channel: new types.InputChannel({ channel_id: channelId, access_hash }),
|
|
1169
1226
|
filter: new types.ChannelMessagesFilterEmpty(),
|
|
1170
1227
|
limit: await this.storage.getAccountType() == "user" ? CHANNEL_DIFFERENCE_LIMIT_USER : CHANNEL_DIFFERENCE_LIMIT_BOT,
|
|
1171
1228
|
}));
|
|
1172
|
-
if (difference instanceof types.
|
|
1229
|
+
if (difference instanceof types.updates.ChannelDifference) {
|
|
1173
1230
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processChats).call(this, difference.chats);
|
|
1174
1231
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUsers).call(this, difference.users);
|
|
1175
|
-
for (const message of difference.
|
|
1176
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, new types.UpdateNewChannelMessage({ message, pts: 0,
|
|
1232
|
+
for (const message of difference.new_messages) {
|
|
1233
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, new types.UpdateNewChannelMessage({ message, pts: 0, pts_count: 0 }), false);
|
|
1177
1234
|
}
|
|
1178
|
-
for (const update of difference.
|
|
1235
|
+
for (const update of difference.other_updates) {
|
|
1179
1236
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, update, false);
|
|
1180
1237
|
}
|
|
1181
1238
|
await this.storage.setChannelPts(channelId, difference.pts);
|
|
1182
1239
|
dGapC("recovered from update gap [%o, %s]", channelId, source);
|
|
1183
1240
|
break;
|
|
1184
1241
|
}
|
|
1185
|
-
else if (difference instanceof types.
|
|
1242
|
+
else if (difference instanceof types.updates.ChannelDifferenceTooLong) {
|
|
1186
1243
|
// invalidate messages
|
|
1187
1244
|
dGapC("received channelDifferenceTooLong");
|
|
1188
1245
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processChats).call(this, difference.chats);
|
|
1189
1246
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUsers).call(this, difference.users);
|
|
1190
1247
|
for (const message of difference.messages) {
|
|
1191
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, new types.UpdateNewChannelMessage({ message, pts: 0,
|
|
1248
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUpdates).call(this, new types.UpdateNewChannelMessage({ message, pts: 0, pts_count: 0 }), false);
|
|
1192
1249
|
}
|
|
1193
1250
|
const pts_ = difference.dialog[as](types.Dialog).pts;
|
|
1194
1251
|
if (pts_ != undefined) {
|
|
@@ -1199,14 +1256,14 @@ export class Client extends ClientAbstract {
|
|
|
1199
1256
|
}
|
|
1200
1257
|
dGapC("processed channelDifferenceTooLong");
|
|
1201
1258
|
}
|
|
1202
|
-
else if (difference instanceof types.
|
|
1259
|
+
else if (difference instanceof types.updates.ChannelDifferenceEmpty) {
|
|
1203
1260
|
dGapC("there was no update gap");
|
|
1204
1261
|
break;
|
|
1205
1262
|
}
|
|
1206
1263
|
}
|
|
1207
1264
|
}, _Client_getChannelAccessHash = async function _Client_getChannelAccessHash(channelId) {
|
|
1208
|
-
const channels = await this.invoke(new functions.
|
|
1209
|
-
return channels.chats[0][as](types.Channel).
|
|
1265
|
+
const channels = await this.invoke(new functions.channels.getChannels({ id: [new types.InputChannel({ channel_id: channelId, access_hash: 0n })] }));
|
|
1266
|
+
return channels.chats[0][as](types.Channel).access_hash ?? 0n;
|
|
1210
1267
|
}, _Client_getInputPeerInner = async function _Client_getInputPeerInner(id) {
|
|
1211
1268
|
if (typeof id === "string") {
|
|
1212
1269
|
id = getUsername(id);
|
|
@@ -1223,14 +1280,14 @@ export class Client extends ClientAbstract {
|
|
|
1223
1280
|
}
|
|
1224
1281
|
}
|
|
1225
1282
|
else {
|
|
1226
|
-
const resolved = await this.invoke(new functions.
|
|
1283
|
+
const resolved = await this.invoke(new functions.contacts.resolveUsername({ username: id }));
|
|
1227
1284
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processChats).call(this, resolved.chats);
|
|
1228
1285
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUsers).call(this, resolved.users);
|
|
1229
1286
|
if (resolved.peer instanceof types.PeerUser) {
|
|
1230
|
-
userId = resolved.peer.
|
|
1287
|
+
userId = resolved.peer.user_id;
|
|
1231
1288
|
}
|
|
1232
1289
|
else if (resolved.peer instanceof types.PeerChannel) {
|
|
1233
|
-
channelId = resolved.peer.
|
|
1290
|
+
channelId = resolved.peer.channel_id;
|
|
1234
1291
|
}
|
|
1235
1292
|
else {
|
|
1236
1293
|
UNREACHABLE();
|
|
@@ -1238,11 +1295,11 @@ export class Client extends ClientAbstract {
|
|
|
1238
1295
|
}
|
|
1239
1296
|
if (userId) {
|
|
1240
1297
|
const accessHash = await this.storage.getUserAccessHash(userId);
|
|
1241
|
-
return new types.InputPeerUser({ userId,
|
|
1298
|
+
return new types.InputPeerUser({ user_id: userId, access_hash: accessHash ?? 0n });
|
|
1242
1299
|
}
|
|
1243
1300
|
else if (channelId) {
|
|
1244
1301
|
const accessHash = await this.storage.getChannelAccessHash(channelId);
|
|
1245
|
-
return new types.InputPeerChannel({ channelId,
|
|
1302
|
+
return new types.InputPeerChannel({ channel_id: channelId, access_hash: accessHash ?? 0n });
|
|
1246
1303
|
}
|
|
1247
1304
|
else {
|
|
1248
1305
|
UNREACHABLE();
|
|
@@ -1251,70 +1308,70 @@ export class Client extends ClientAbstract {
|
|
|
1251
1308
|
else if (id > 0) {
|
|
1252
1309
|
const id_ = BigInt(id);
|
|
1253
1310
|
const accessHash = await this.storage.getUserAccessHash(id_);
|
|
1254
|
-
return new types.InputPeerUser({
|
|
1311
|
+
return new types.InputPeerUser({ user_id: id_, access_hash: accessHash ?? 0n });
|
|
1255
1312
|
}
|
|
1256
1313
|
else if (-MAX_CHAT_ID <= id) {
|
|
1257
|
-
return new types.InputPeerChat({
|
|
1314
|
+
return new types.InputPeerChat({ chat_id: BigInt(Math.abs(id)) });
|
|
1258
1315
|
}
|
|
1259
1316
|
else if (ZERO_CHANNEL_ID - MAX_CHANNEL_ID <= id && id != ZERO_CHANNEL_ID) {
|
|
1260
1317
|
const id_ = BigInt(Math.abs(id - ZERO_CHANNEL_ID));
|
|
1261
1318
|
const accessHash = await this.storage.getChannelAccessHash(id_);
|
|
1262
|
-
return new types.InputPeerChannel({
|
|
1319
|
+
return new types.InputPeerChannel({ channel_id: id_, access_hash: accessHash ?? 0n });
|
|
1263
1320
|
}
|
|
1264
1321
|
else {
|
|
1265
1322
|
throw new Error("ID format unknown or not implemented");
|
|
1266
1323
|
}
|
|
1267
1324
|
}, getEntity)](peer) {
|
|
1268
1325
|
const type = peer instanceof types.PeerUser ? "user" : peer instanceof types.PeerChat ? "chat" : peer instanceof types.PeerChannel ? "channel" : UNREACHABLE();
|
|
1269
|
-
const id = peer instanceof types.PeerUser ? peer.
|
|
1326
|
+
const id = peer instanceof types.PeerUser ? peer.user_id : peer instanceof types.PeerChat ? peer.chat_id : peer instanceof types.PeerChannel ? peer.channel_id : UNREACHABLE();
|
|
1270
1327
|
return this.storage.getEntity(type, id);
|
|
1271
1328
|
}
|
|
1272
1329
|
async processResult(result) {
|
|
1273
|
-
if (result instanceof types.
|
|
1274
|
-
result instanceof types.
|
|
1275
|
-
result instanceof types.
|
|
1276
|
-
result instanceof types.
|
|
1277
|
-
result instanceof types.
|
|
1278
|
-
result instanceof types.
|
|
1279
|
-
result instanceof types.
|
|
1280
|
-
result instanceof types.
|
|
1281
|
-
result instanceof types.
|
|
1282
|
-
result instanceof types.
|
|
1283
|
-
result instanceof types.
|
|
1284
|
-
result instanceof types.
|
|
1285
|
-
result instanceof types.
|
|
1286
|
-
result instanceof types.
|
|
1287
|
-
result instanceof types.
|
|
1288
|
-
result instanceof types.
|
|
1289
|
-
result instanceof types.
|
|
1290
|
-
result instanceof types.
|
|
1291
|
-
result instanceof types.
|
|
1292
|
-
result instanceof types.
|
|
1293
|
-
result instanceof types.
|
|
1294
|
-
result instanceof types.
|
|
1295
|
-
result instanceof types.
|
|
1296
|
-
result instanceof types.
|
|
1297
|
-
result instanceof types.
|
|
1298
|
-
result instanceof types.
|
|
1299
|
-
result instanceof types.
|
|
1300
|
-
result instanceof types.
|
|
1301
|
-
result instanceof types.
|
|
1302
|
-
result instanceof types.
|
|
1303
|
-
result instanceof types.
|
|
1304
|
-
result instanceof types.
|
|
1305
|
-
result instanceof types.
|
|
1306
|
-
result instanceof types.
|
|
1307
|
-
result instanceof types.
|
|
1308
|
-
result instanceof types.
|
|
1330
|
+
if (result instanceof types.messages.Dialogs ||
|
|
1331
|
+
result instanceof types.messages.DialogsSlice ||
|
|
1332
|
+
result instanceof types.messages.Messages ||
|
|
1333
|
+
result instanceof types.messages.MessagesSlice ||
|
|
1334
|
+
result instanceof types.messages.ChannelMessages ||
|
|
1335
|
+
result instanceof types.messages.ChatFull ||
|
|
1336
|
+
result instanceof types.contacts.Found ||
|
|
1337
|
+
result instanceof types.account.PrivacyRules ||
|
|
1338
|
+
result instanceof types.contacts.ResolvedPeer ||
|
|
1339
|
+
result instanceof types.channels.ChannelParticipants ||
|
|
1340
|
+
result instanceof types.channels.ChannelParticipant ||
|
|
1341
|
+
result instanceof types.messages.PeerDialogs ||
|
|
1342
|
+
result instanceof types.contacts.TopPeers ||
|
|
1343
|
+
result instanceof types.channels.AdminLogResults ||
|
|
1344
|
+
result instanceof types.help.RecentMeUrls ||
|
|
1345
|
+
result instanceof types.messages.InactiveChats ||
|
|
1346
|
+
result instanceof types.help.PromoData ||
|
|
1347
|
+
result instanceof types.messages.MessageViews ||
|
|
1348
|
+
result instanceof types.messages.DiscussionMessage ||
|
|
1349
|
+
result instanceof types.phone.GroupCall ||
|
|
1350
|
+
result instanceof types.phone.GroupParticipants ||
|
|
1351
|
+
result instanceof types.phone.JoinAsPeers ||
|
|
1352
|
+
result instanceof types.messages.SponsoredMessages ||
|
|
1353
|
+
result instanceof types.messages.SearchResultsCalendar ||
|
|
1354
|
+
result instanceof types.channels.SendAsPeers ||
|
|
1355
|
+
result instanceof types.users.UserFull ||
|
|
1356
|
+
result instanceof types.messages.PeerSettings ||
|
|
1357
|
+
result instanceof types.messages.MessageReactionsList ||
|
|
1358
|
+
result instanceof types.messages.ForumTopics ||
|
|
1359
|
+
result instanceof types.account.AutoSaveSettings ||
|
|
1360
|
+
result instanceof types.chatlists.ExportedInvites ||
|
|
1361
|
+
result instanceof types.chatlists.ChatlistInviteAlready ||
|
|
1362
|
+
result instanceof types.chatlists.ChatlistInvite ||
|
|
1363
|
+
result instanceof types.chatlists.ChatlistUpdates ||
|
|
1364
|
+
result instanceof types.messages.Chats ||
|
|
1365
|
+
result instanceof types.messages.ChatsSlice) {
|
|
1309
1366
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processChats).call(this, result.chats);
|
|
1310
1367
|
if ("users" in result) {
|
|
1311
1368
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUsers).call(this, result.users);
|
|
1312
1369
|
}
|
|
1313
1370
|
}
|
|
1314
|
-
if (result instanceof types.
|
|
1371
|
+
if (result instanceof types.messages.Messages) {
|
|
1315
1372
|
for (const message of result.messages) {
|
|
1316
1373
|
if (message instanceof types.Message || message instanceof types.MessageService) {
|
|
1317
|
-
await this.storage.setMessage(peerToChatId(message.
|
|
1374
|
+
await this.storage.setMessage(peerToChatId(message.peer_id), message.id, message);
|
|
1318
1375
|
}
|
|
1319
1376
|
}
|
|
1320
1377
|
}
|
|
@@ -1338,20 +1395,20 @@ export class Client extends ClientAbstract {
|
|
|
1338
1395
|
const replyToMsgId = params?.replyToMessageId;
|
|
1339
1396
|
const topMsgId = params?.messageThreadId;
|
|
1340
1397
|
const sendAs = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_resolveSendAs).call(this, params);
|
|
1341
|
-
const result = await this.invoke(new functions.
|
|
1398
|
+
const result = await this.invoke(new functions.messages.sendMessage({
|
|
1342
1399
|
peer,
|
|
1343
|
-
randomId,
|
|
1400
|
+
random_id: randomId,
|
|
1344
1401
|
message,
|
|
1345
|
-
noWebpage,
|
|
1402
|
+
no_webpage: noWebpage,
|
|
1346
1403
|
silent,
|
|
1347
1404
|
noforwards,
|
|
1348
|
-
|
|
1349
|
-
sendAs,
|
|
1405
|
+
reply_to: replyToMsgId !== undefined ? new types.InputReplyToMessage({ reply_to_msg_id: replyToMsgId, top_msg_id: topMsgId }) : undefined,
|
|
1406
|
+
send_as: sendAs,
|
|
1350
1407
|
entities,
|
|
1351
|
-
replyMarkup,
|
|
1408
|
+
reply_markup: replyMarkup,
|
|
1352
1409
|
}));
|
|
1353
1410
|
const message_ = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
|
|
1354
|
-
return __classPrivateFieldGet(
|
|
1411
|
+
return __classPrivateFieldGet(_a, _a, "m", _Client_assertMsgHas).call(_a, message_, "text");
|
|
1355
1412
|
}
|
|
1356
1413
|
/**
|
|
1357
1414
|
* Edit a message's text.
|
|
@@ -1364,16 +1421,16 @@ export class Client extends ClientAbstract {
|
|
|
1364
1421
|
*/
|
|
1365
1422
|
async editMessageText(chatId, messageId, text, params) {
|
|
1366
1423
|
const [message, entities] = __classPrivateFieldGet(this, _Client_instances, "m", _Client_parseText).call(this, text, params);
|
|
1367
|
-
const result = await this.invoke(new functions.
|
|
1424
|
+
const result = await this.invoke(new functions.messages.editMessage({
|
|
1368
1425
|
id: messageId,
|
|
1369
1426
|
peer: await this.getInputPeer(chatId),
|
|
1370
1427
|
entities,
|
|
1371
1428
|
message,
|
|
1372
|
-
|
|
1373
|
-
|
|
1429
|
+
no_webpage: params?.disableWebPagePreview ? true : undefined,
|
|
1430
|
+
reply_markup: await __classPrivateFieldGet(this, _Client_instances, "m", _Client_constructReplyMarkup).call(this, params),
|
|
1374
1431
|
}));
|
|
1375
1432
|
const message_ = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
|
|
1376
|
-
return __classPrivateFieldGet(
|
|
1433
|
+
return __classPrivateFieldGet(_a, _a, "m", _Client_assertMsgHas).call(_a, message_, "text");
|
|
1377
1434
|
}
|
|
1378
1435
|
/**
|
|
1379
1436
|
* Retrieve multiple messages.
|
|
@@ -1454,15 +1511,15 @@ export class Client extends ClientAbstract {
|
|
|
1454
1511
|
}
|
|
1455
1512
|
if (shouldFetch) {
|
|
1456
1513
|
if (peer instanceof types.InputPeerChannel) {
|
|
1457
|
-
messages_ = await this.invoke(new functions.
|
|
1458
|
-
channel: new types.InputChannel({
|
|
1514
|
+
messages_ = await this.invoke(new functions.channels.getMessages({
|
|
1515
|
+
channel: new types.InputChannel({ channel_id: peer.channel_id, access_hash: peer.access_hash }),
|
|
1459
1516
|
id: messageIds.map((v) => new types.InputMessageID({ id: v })),
|
|
1460
|
-
})).then((v) => v[as](types.
|
|
1517
|
+
})).then((v) => v[as](types.messages.ChannelMessages).messages);
|
|
1461
1518
|
}
|
|
1462
1519
|
else {
|
|
1463
|
-
messages_ = await this.invoke(new functions.
|
|
1520
|
+
messages_ = await this.invoke(new functions.messages.getMessages({
|
|
1464
1521
|
id: messageIds.map((v) => new types.InputMessageID({ id: v })),
|
|
1465
|
-
})).then((v) => v[as](types.
|
|
1522
|
+
})).then((v) => v[as](types.messages.Messages).messages);
|
|
1466
1523
|
}
|
|
1467
1524
|
}
|
|
1468
1525
|
const messages = new Array();
|
|
@@ -1471,7 +1528,7 @@ export class Client extends ClientAbstract {
|
|
|
1471
1528
|
continue;
|
|
1472
1529
|
}
|
|
1473
1530
|
const message = await constructMessage(message_, this[getEntity].bind(this), null, this[getStickerSetName].bind(this));
|
|
1474
|
-
const isReplyToMessage = message_ instanceof types.Message && message_.
|
|
1531
|
+
const isReplyToMessage = message_ instanceof types.Message && message_.reply_to instanceof types.MessageReplyHeader;
|
|
1475
1532
|
messages.push({ message, isReplyToMessage });
|
|
1476
1533
|
}
|
|
1477
1534
|
return messages;
|
|
@@ -1512,7 +1569,7 @@ export class Client extends ClientAbstract {
|
|
|
1512
1569
|
case FileType.ChatPhoto: {
|
|
1513
1570
|
const big = fileId_.params.thumbnailSource == ThumbnailSource.ChatPhotoBig;
|
|
1514
1571
|
const peer = await this.getInputPeer(fileId_.params.chatId);
|
|
1515
|
-
const location = new types.InputPeerPhotoFileLocation({ big: big ? true : undefined, peer,
|
|
1572
|
+
const location = new types.InputPeerPhotoFileLocation({ big: big ? true : undefined, peer, photo_id: fileId_.params.mediaId });
|
|
1516
1573
|
return __classPrivateFieldGet(this, _Client_instances, "m", _Client_downloadInner).call(this, location, fileId_.dcId, params);
|
|
1517
1574
|
}
|
|
1518
1575
|
case FileType.Photo: {
|
|
@@ -1521,9 +1578,9 @@ export class Client extends ClientAbstract {
|
|
|
1521
1578
|
}
|
|
1522
1579
|
const location = new types.InputPhotoFileLocation({
|
|
1523
1580
|
id: fileId_.params.mediaId,
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1581
|
+
access_hash: fileId_.params.accessHash,
|
|
1582
|
+
file_reference: fileId_.params.fileReference,
|
|
1583
|
+
thumb_size: fileId_.params.thumbnailSize,
|
|
1527
1584
|
});
|
|
1528
1585
|
return __classPrivateFieldGet(this, _Client_instances, "m", _Client_downloadInner).call(this, location, fileId_.dcId, params);
|
|
1529
1586
|
}
|
|
@@ -1536,8 +1593,8 @@ export class Client extends ClientAbstract {
|
|
|
1536
1593
|
if (mod(chunkSize, 1024) != 0) {
|
|
1537
1594
|
throw new Error("chunkSize must be divisible by 1024");
|
|
1538
1595
|
}
|
|
1539
|
-
const exportedAuth = await this.invoke(new functions.
|
|
1540
|
-
const client = new
|
|
1596
|
+
const exportedAuth = await this.invoke(new functions.auth.exportAuthorization({ dc_id: dcId }));
|
|
1597
|
+
const client = new _a(new StorageMemory(), this.apiId, this.apiHash, {
|
|
1541
1598
|
transportProvider: this.transportProvider,
|
|
1542
1599
|
appVersion: this.appVersion,
|
|
1543
1600
|
deviceModel: this.deviceModel,
|
|
@@ -1557,8 +1614,8 @@ export class Client extends ClientAbstract {
|
|
|
1557
1614
|
const limit = chunkSize;
|
|
1558
1615
|
let offset = 0n;
|
|
1559
1616
|
while (true) {
|
|
1560
|
-
const file = await (client ?? this).invoke(new functions.
|
|
1561
|
-
if (file instanceof types.
|
|
1617
|
+
const file = await (client ?? this).invoke(new functions.upload.getFile({ location, offset, limit }));
|
|
1618
|
+
if (file instanceof types.upload.File) {
|
|
1562
1619
|
yield file.bytes;
|
|
1563
1620
|
if (file.bytes.length < limit) {
|
|
1564
1621
|
break;
|
|
@@ -1572,14 +1629,14 @@ export class Client extends ClientAbstract {
|
|
|
1572
1629
|
}
|
|
1573
1630
|
}
|
|
1574
1631
|
}, getStickerSetName)](inputStickerSet, hash = 0) {
|
|
1575
|
-
const maybeStickerSetName = await this.storage.getStickerSetName(inputStickerSet.id, inputStickerSet.
|
|
1632
|
+
const maybeStickerSetName = await this.storage.getStickerSetName(inputStickerSet.id, inputStickerSet.access_hash);
|
|
1576
1633
|
if (maybeStickerSetName != null && Date.now() - maybeStickerSetName[1].getTime() < STICKER_SET_NAME_TTL) {
|
|
1577
1634
|
return maybeStickerSetName[0];
|
|
1578
1635
|
}
|
|
1579
1636
|
else {
|
|
1580
|
-
const stickerSet = await this.invoke(new functions.
|
|
1581
|
-
const name = stickerSet[as](types.
|
|
1582
|
-
await this.storage.updateStickerSetName(inputStickerSet.id, inputStickerSet.
|
|
1637
|
+
const stickerSet = await this.invoke(new functions.messages.getStickerSet({ stickerset: inputStickerSet, hash }));
|
|
1638
|
+
const name = stickerSet[as](types.messages.StickerSet).set.short_name;
|
|
1639
|
+
await this.storage.updateStickerSetName(inputStickerSet.id, inputStickerSet.access_hash, name);
|
|
1583
1640
|
return name;
|
|
1584
1641
|
}
|
|
1585
1642
|
}
|
|
@@ -1593,17 +1650,17 @@ export class Client extends ClientAbstract {
|
|
|
1593
1650
|
* @returns The forwarded messages.
|
|
1594
1651
|
*/
|
|
1595
1652
|
async forwardMessages(from, to, messageIds, params) {
|
|
1596
|
-
const result = await this.invoke(new functions.
|
|
1597
|
-
|
|
1598
|
-
|
|
1653
|
+
const result = await this.invoke(new functions.messages.forwardMessages({
|
|
1654
|
+
from_peer: await this.getInputPeer(from),
|
|
1655
|
+
to_peer: await this.getInputPeer(to),
|
|
1599
1656
|
id: messageIds,
|
|
1600
|
-
|
|
1657
|
+
random_id: messageIds.map(() => getRandomId()),
|
|
1601
1658
|
silent: params?.disableNotification || undefined,
|
|
1602
|
-
|
|
1659
|
+
top_msg_id: params?.messageThreadId,
|
|
1603
1660
|
noforwards: params?.disableNotification || undefined,
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1661
|
+
send_as: params?.sendAs ? await this.getInputPeer(params.sendAs) : undefined,
|
|
1662
|
+
drop_author: params?.dropSenderName || undefined,
|
|
1663
|
+
drop_media_captions: params?.dropCaption || undefined,
|
|
1607
1664
|
}));
|
|
1608
1665
|
return await __classPrivateFieldGet(this, _Client_instances, "m", _Client_updatesToMessages).call(this, to, result);
|
|
1609
1666
|
}
|
|
@@ -1625,7 +1682,7 @@ export class Client extends ClientAbstract {
|
|
|
1625
1682
|
* @method
|
|
1626
1683
|
*/
|
|
1627
1684
|
async getMe() {
|
|
1628
|
-
const users = await this.invoke(new functions.
|
|
1685
|
+
const users = await this.invoke(new functions.users.getUsers({ id: [new types.InputUserSelf()] }));
|
|
1629
1686
|
if (users.length < 1) {
|
|
1630
1687
|
UNREACHABLE();
|
|
1631
1688
|
}
|
|
@@ -1641,9 +1698,9 @@ export class Client extends ClientAbstract {
|
|
|
1641
1698
|
*/
|
|
1642
1699
|
async answerCallbackQuery(id, params) {
|
|
1643
1700
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_assertBot).call(this, "answerCallbackQuery");
|
|
1644
|
-
await this.invoke(new functions.
|
|
1645
|
-
|
|
1646
|
-
|
|
1701
|
+
await this.invoke(new functions.messages.setBotCallbackAnswer({
|
|
1702
|
+
query_id: BigInt(id),
|
|
1703
|
+
cache_time: params?.cacheTime ?? 0,
|
|
1647
1704
|
message: params?.text,
|
|
1648
1705
|
alert: params?.alert ? true : undefined,
|
|
1649
1706
|
}));
|
|
@@ -1676,31 +1733,31 @@ export class Client extends ClientAbstract {
|
|
|
1676
1733
|
answers,
|
|
1677
1734
|
question,
|
|
1678
1735
|
closed: params?.isClosed ? true : undefined,
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1736
|
+
close_date: params?.closeDate ? Math.floor(params.closeDate.getTime() / 1000) : undefined,
|
|
1737
|
+
close_period: params?.openPeriod ? params.openPeriod : undefined,
|
|
1738
|
+
multiple_choice: params?.allowMultipleAnswers ? true : undefined,
|
|
1739
|
+
public_voters: params?.isAnonymous === false ? true : undefined,
|
|
1683
1740
|
quiz: params?.type == "quiz" ? true : undefined,
|
|
1684
1741
|
});
|
|
1685
1742
|
const media = new types.InputMediaPoll({
|
|
1686
1743
|
poll,
|
|
1687
|
-
|
|
1744
|
+
correct_answers: params?.correctOptionIndex ? [new Uint8Array([params.correctOptionIndex])] : undefined,
|
|
1688
1745
|
solution,
|
|
1689
|
-
solutionEntities,
|
|
1746
|
+
solution_entities: solutionEntities,
|
|
1690
1747
|
});
|
|
1691
|
-
const result = await this.invoke(new functions.
|
|
1748
|
+
const result = await this.invoke(new functions.messages.sendMedia({
|
|
1692
1749
|
peer,
|
|
1693
|
-
randomId,
|
|
1750
|
+
random_id: randomId,
|
|
1694
1751
|
silent,
|
|
1695
1752
|
noforwards,
|
|
1696
|
-
replyMarkup,
|
|
1697
|
-
|
|
1698
|
-
sendAs,
|
|
1753
|
+
reply_markup: replyMarkup,
|
|
1754
|
+
reply_to: replyToMsgId !== undefined ? new types.InputReplyToMessage({ reply_to_msg_id: replyToMsgId, top_msg_id: topMsgId }) : undefined,
|
|
1755
|
+
send_as: sendAs,
|
|
1699
1756
|
media,
|
|
1700
1757
|
message: "",
|
|
1701
1758
|
}));
|
|
1702
1759
|
const message = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
|
|
1703
|
-
return __classPrivateFieldGet(
|
|
1760
|
+
return __classPrivateFieldGet(_a, _a, "m", _Client_assertMsgHas).call(_a, message, "poll");
|
|
1704
1761
|
}
|
|
1705
1762
|
/**
|
|
1706
1763
|
* Send a chat action.
|
|
@@ -1749,7 +1806,7 @@ export class Client extends ClientAbstract {
|
|
|
1749
1806
|
default:
|
|
1750
1807
|
throw new Error("Invalid chat action: " + action);
|
|
1751
1808
|
}
|
|
1752
|
-
await this.invoke(new functions.
|
|
1809
|
+
await this.invoke(new functions.messages.setTyping({ peer: await this.getInputPeer(chatId), action: action_, top_msg_id: params?.messageThreadId }));
|
|
1753
1810
|
}
|
|
1754
1811
|
/**
|
|
1755
1812
|
* Upload a file.
|
|
@@ -1767,7 +1824,7 @@ export class Client extends ClientAbstract {
|
|
|
1767
1824
|
dUpload("uploading " + (isBig ? "big " : "") + "file of size " + contents.length + " with chunk size of " + chunkSize);
|
|
1768
1825
|
const fileId = getRandomId();
|
|
1769
1826
|
const name = params?.fileName ?? fileId.toString();
|
|
1770
|
-
const client = new
|
|
1827
|
+
const client = new _a(this.storage, this.apiId, this.apiHash, {
|
|
1771
1828
|
transportProvider: this.transportProvider,
|
|
1772
1829
|
appVersion: this.appVersion,
|
|
1773
1830
|
deviceModel: this.deviceModel,
|
|
@@ -1795,10 +1852,10 @@ export class Client extends ClientAbstract {
|
|
|
1795
1852
|
continue main;
|
|
1796
1853
|
}
|
|
1797
1854
|
if (isBig) {
|
|
1798
|
-
await client.invoke(new functions.
|
|
1855
|
+
await client.invoke(new functions.upload.saveBigFilePart({ file_id: fileId, file_part: part, bytes, file_total_parts: partCount }));
|
|
1799
1856
|
}
|
|
1800
1857
|
else {
|
|
1801
|
-
await client.invoke(new functions.
|
|
1858
|
+
await client.invoke(new functions.upload.saveFilePart({ file_id: fileId, bytes, file_part: part }));
|
|
1802
1859
|
}
|
|
1803
1860
|
dUpload((part + 1) + " out of " + partCount + " chunks have been uploaded so far");
|
|
1804
1861
|
break chunk;
|
|
@@ -1839,7 +1896,7 @@ export class Client extends ClientAbstract {
|
|
|
1839
1896
|
return new types.InputFileBig({ id: fileId, parts: contents.length / chunkSize, name });
|
|
1840
1897
|
}
|
|
1841
1898
|
else {
|
|
1842
|
-
return new types.InputFile({ id: fileId, name, parts: part,
|
|
1899
|
+
return new types.InputFile({ id: fileId, name, parts: part, md5_checksum: "" });
|
|
1843
1900
|
}
|
|
1844
1901
|
}
|
|
1845
1902
|
/**
|
|
@@ -1849,9 +1906,9 @@ export class Client extends ClientAbstract {
|
|
|
1849
1906
|
* @param commands The commands to set.
|
|
1850
1907
|
*/
|
|
1851
1908
|
async setMyCommands(commands, params) {
|
|
1852
|
-
await this.invoke(new functions.
|
|
1909
|
+
await this.invoke(new functions.bots.setBotCommands({
|
|
1853
1910
|
commands: commands.map((v) => new types.BotCommand(v)),
|
|
1854
|
-
|
|
1911
|
+
lang_code: params?.languageCode ?? "",
|
|
1855
1912
|
scope: await botCommandScopeToTlObject(params?.scope ?? { type: "default" }, this.getInputPeer.bind(this)),
|
|
1856
1913
|
}));
|
|
1857
1914
|
}
|
|
@@ -1859,8 +1916,8 @@ export class Client extends ClientAbstract {
|
|
|
1859
1916
|
* Get the bot's commands in the given scope and/or language. Bot-only.
|
|
1860
1917
|
*/
|
|
1861
1918
|
async getMyCommands(params) {
|
|
1862
|
-
const commands_ = await this.invoke(new functions.
|
|
1863
|
-
|
|
1919
|
+
const commands_ = await this.invoke(new functions.bots.getBotCommands({
|
|
1920
|
+
lang_code: params?.languageCode ?? "",
|
|
1864
1921
|
scope: await botCommandScopeToTlObject(params?.scope ?? { type: "default" }, this.getInputPeer.bind(this)),
|
|
1865
1922
|
}));
|
|
1866
1923
|
return commands_.map((v) => ({ command: v.command, description: v.description }));
|
|
@@ -1873,15 +1930,15 @@ export class Client extends ClientAbstract {
|
|
|
1873
1930
|
* @param results The results to answer with.
|
|
1874
1931
|
*/
|
|
1875
1932
|
async answerInlineQuery(id, results, params) {
|
|
1876
|
-
await this.invoke(new functions.
|
|
1877
|
-
|
|
1933
|
+
await this.invoke(new functions.messages.setInlineBotResults({
|
|
1934
|
+
query_id: BigInt(id),
|
|
1878
1935
|
results: await Promise.all(results.map((v) => inlineQueryResultToTlObject(v, __classPrivateFieldGet(this, _Client_instances, "m", _Client_parseText).bind(this), __classPrivateFieldGet(this, _Client_usernameResolver, "f").bind(this)))),
|
|
1879
|
-
|
|
1936
|
+
cache_time: params?.cacheTime ?? 300,
|
|
1880
1937
|
private: params?.isPersonal ? true : undefined,
|
|
1881
|
-
|
|
1882
|
-
|
|
1938
|
+
switch_webview: params?.button && params.button.webApp ? new types.InlineBotWebView({ text: params.button.text, url: params.button.webApp.url }) : undefined,
|
|
1939
|
+
switch_pm: params?.button && params.button.startParameter ? new types.InlineBotSwitchPM({ text: params.button.text, start_param: params.button.startParameter }) : undefined,
|
|
1883
1940
|
gallery: params?.isGallery ? true : undefined,
|
|
1884
|
-
|
|
1941
|
+
next_offset: params?.nextOffset,
|
|
1885
1942
|
}));
|
|
1886
1943
|
}
|
|
1887
1944
|
use(...middleware) {
|
|
@@ -1977,7 +2034,7 @@ export class Client extends ClientAbstract {
|
|
|
1977
2034
|
*/
|
|
1978
2035
|
async setMyDescription({ description, languageCode }) {
|
|
1979
2036
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_assertBot).call(this, "setMyDescription");
|
|
1980
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setMyInfo).call(this, { description,
|
|
2037
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setMyInfo).call(this, { description, lang_code: languageCode ?? "" });
|
|
1981
2038
|
}
|
|
1982
2039
|
/**
|
|
1983
2040
|
* Set the bot's name in the given language. Bot-only.
|
|
@@ -1986,7 +2043,7 @@ export class Client extends ClientAbstract {
|
|
|
1986
2043
|
*/
|
|
1987
2044
|
async setMyName({ name, languageCode }) {
|
|
1988
2045
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_assertBot).call(this, "setMyName");
|
|
1989
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setMyInfo).call(this, { name,
|
|
2046
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setMyInfo).call(this, { name, lang_code: languageCode ?? "" });
|
|
1990
2047
|
}
|
|
1991
2048
|
/**
|
|
1992
2049
|
* Set the bot's short description in the given language. Bot-only.
|
|
@@ -1995,7 +2052,7 @@ export class Client extends ClientAbstract {
|
|
|
1995
2052
|
*/
|
|
1996
2053
|
async setMyShortDescription({ shortDescription: about, languageCode }) {
|
|
1997
2054
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_assertBot).call(this, "setMyShortDescription");
|
|
1998
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setMyInfo).call(this, { about,
|
|
2055
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setMyInfo).call(this, { about, lang_code: languageCode ?? "" });
|
|
1999
2056
|
}
|
|
2000
2057
|
/**
|
|
2001
2058
|
* Get the bot's description in the given language. Bot-only.
|
|
@@ -2034,10 +2091,10 @@ export class Client extends ClientAbstract {
|
|
|
2034
2091
|
async deleteMessages(chatId, messageIds, params) {
|
|
2035
2092
|
const peer = await this.getInputPeer(chatId);
|
|
2036
2093
|
if (peer instanceof types.InputPeerChannel) {
|
|
2037
|
-
await this.invoke(new functions.
|
|
2094
|
+
await this.invoke(new functions.channels.deleteMessages({ channel: new types.InputChannel(peer), id: messageIds }));
|
|
2038
2095
|
}
|
|
2039
2096
|
else {
|
|
2040
|
-
await this.invoke(new functions.
|
|
2097
|
+
await this.invoke(new functions.messages.deleteMessages({ id: messageIds, revoke: params?.onlyForMe ? undefined : true }));
|
|
2041
2098
|
}
|
|
2042
2099
|
}
|
|
2043
2100
|
/**
|
|
@@ -2078,8 +2135,8 @@ export class Client extends ClientAbstract {
|
|
|
2078
2135
|
media = new types.InputMediaPhoto({
|
|
2079
2136
|
id: new types.InputPhoto({
|
|
2080
2137
|
id: fileId.params.mediaId,
|
|
2081
|
-
|
|
2082
|
-
|
|
2138
|
+
access_hash: fileId.params.accessHash,
|
|
2139
|
+
file_reference: fileId.params.fileReference,
|
|
2083
2140
|
}),
|
|
2084
2141
|
spoiler,
|
|
2085
2142
|
});
|
|
@@ -2107,20 +2164,20 @@ export class Client extends ClientAbstract {
|
|
|
2107
2164
|
const parseResult = caption_ !== undefined ? __classPrivateFieldGet(this, _Client_instances, "m", _Client_parseText).call(this, caption_, { parseMode: params?.parseMode, entities: params?.captionEntities }) : undefined;
|
|
2108
2165
|
const caption = parseResult === undefined ? undefined : parseResult[0];
|
|
2109
2166
|
const captionEntities = parseResult === undefined ? undefined : parseResult[1];
|
|
2110
|
-
const result = await this.invoke(new functions.
|
|
2167
|
+
const result = await this.invoke(new functions.messages.sendMedia({
|
|
2111
2168
|
peer,
|
|
2112
|
-
randomId,
|
|
2169
|
+
random_id: randomId,
|
|
2113
2170
|
silent,
|
|
2114
2171
|
noforwards,
|
|
2115
|
-
replyMarkup,
|
|
2116
|
-
|
|
2117
|
-
sendAs,
|
|
2172
|
+
reply_markup: replyMarkup,
|
|
2173
|
+
reply_to: replyToMsgId !== undefined ? new types.InputReplyToMessage({ reply_to_msg_id: replyToMsgId, top_msg_id: topMsgId }) : undefined,
|
|
2174
|
+
send_as: sendAs,
|
|
2118
2175
|
media,
|
|
2119
2176
|
message: caption ?? "",
|
|
2120
2177
|
entities: captionEntities,
|
|
2121
2178
|
}));
|
|
2122
2179
|
const message = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
|
|
2123
|
-
return __classPrivateFieldGet(
|
|
2180
|
+
return __classPrivateFieldGet(_a, _a, "m", _Client_assertMsgHas).call(_a, message, "photo");
|
|
2124
2181
|
}
|
|
2125
2182
|
}
|
|
2126
2183
|
_a = Client, _Client_getMe = async function _Client_getMe() {
|
|
@@ -2140,21 +2197,21 @@ async function _Client_handleUpdate(update) {
|
|
|
2140
2197
|
message: new types.Message({
|
|
2141
2198
|
out: update.out,
|
|
2142
2199
|
mentioned: update.mentioned,
|
|
2143
|
-
|
|
2200
|
+
media_unread: update.media_unread,
|
|
2144
2201
|
silent: update.silent,
|
|
2145
2202
|
id: update.id,
|
|
2146
|
-
|
|
2147
|
-
|
|
2203
|
+
from_id: update.out ? new types.PeerUser({ user_id: await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getSelfId).call(this).then(BigInt) }) : new types.PeerUser({ user_id: update.user_id }),
|
|
2204
|
+
peer_id: new types.PeerChat({ chat_id: update.user_id }),
|
|
2148
2205
|
message: update.message,
|
|
2149
2206
|
date: update.date,
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2207
|
+
fwd_from: update.fwd_from,
|
|
2208
|
+
via_bot_id: update.via_bot_id,
|
|
2209
|
+
reply_to: update.reply_to,
|
|
2153
2210
|
entities: update.entities,
|
|
2154
|
-
|
|
2211
|
+
ttl_period: update.ttl_period,
|
|
2155
2212
|
}),
|
|
2156
2213
|
pts: update.pts,
|
|
2157
|
-
|
|
2214
|
+
pts_count: update.pts_count,
|
|
2158
2215
|
});
|
|
2159
2216
|
}
|
|
2160
2217
|
else if (update instanceof types.UpdateShortChatMessage) {
|
|
@@ -2162,26 +2219,26 @@ async function _Client_handleUpdate(update) {
|
|
|
2162
2219
|
message: new types.Message({
|
|
2163
2220
|
out: update.out,
|
|
2164
2221
|
mentioned: update.mentioned,
|
|
2165
|
-
|
|
2222
|
+
media_unread: update.media_unread,
|
|
2166
2223
|
silent: update.silent,
|
|
2167
2224
|
id: update.id,
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2225
|
+
from_id: new types.PeerUser({ user_id: update.from_id }),
|
|
2226
|
+
peer_id: new types.PeerChat({ chat_id: update.chat_id }),
|
|
2227
|
+
fwd_from: update.fwd_from,
|
|
2228
|
+
via_bot_id: update.via_bot_id,
|
|
2229
|
+
reply_to: update.reply_to,
|
|
2173
2230
|
date: update.date,
|
|
2174
2231
|
message: update.message,
|
|
2175
2232
|
entities: update.entities,
|
|
2176
|
-
|
|
2233
|
+
ttl_period: update.ttl_period,
|
|
2177
2234
|
}),
|
|
2178
2235
|
pts: update.pts,
|
|
2179
|
-
|
|
2236
|
+
pts_count: update.pts_count,
|
|
2180
2237
|
});
|
|
2181
2238
|
}
|
|
2182
2239
|
if (update instanceof types.UpdateNewMessage || update instanceof types.UpdateNewMessage || update instanceof types.UpdateNewChannelMessage || update instanceof types.UpdateNewChannelMessage) {
|
|
2183
2240
|
if (update.message instanceof types.Message || update.message instanceof types.MessageService) {
|
|
2184
|
-
await this.storage.setMessage(peerToChatId(update.message.
|
|
2241
|
+
await this.storage.setMessage(peerToChatId(update.message.peer_id), update.message.id, update.message);
|
|
2185
2242
|
}
|
|
2186
2243
|
}
|
|
2187
2244
|
if (update instanceof types.UpdateNewMessage ||
|
|
@@ -2218,7 +2275,7 @@ async function _Client_handleUpdate(update) {
|
|
|
2218
2275
|
}
|
|
2219
2276
|
}
|
|
2220
2277
|
else if (update instanceof types.UpdateDeleteChannelMessages) {
|
|
2221
|
-
const chatId = getChannelChatId(update.
|
|
2278
|
+
const chatId = getChannelChatId(update.channel_id);
|
|
2222
2279
|
const deletedMessages = new Array();
|
|
2223
2280
|
for (const messageId of update.messages) {
|
|
2224
2281
|
const message = await this.storage.getMessage(chatId, messageId);
|
|
@@ -2250,7 +2307,7 @@ async function _Client_handleUpdate(update) {
|
|
|
2250
2307
|
}, _Client_setMyInfo =
|
|
2251
2308
|
//#endregion
|
|
2252
2309
|
async function _Client_setMyInfo(info) {
|
|
2253
|
-
await this.invoke(new functions.
|
|
2310
|
+
await this.invoke(new functions.bots.setBotInfo({ bot: new types.InputUserSelf(), ...info }));
|
|
2254
2311
|
}, _Client_getMyInfo = function _Client_getMyInfo(languageCode) {
|
|
2255
|
-
return this.invoke(new functions.
|
|
2312
|
+
return this.invoke(new functions.bots.getBotInfo({ bot: new types.InputUserSelf(), lang_code: languageCode ?? "" }));
|
|
2256
2313
|
};
|