@mtkruto/node 0.1.143 → 0.1.145
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 +4 -4
- package/esm/0_deps.js +5 -5
- package/esm/3_types.d.ts +1 -0
- package/esm/3_types.js +1 -0
- package/esm/4_constants.d.ts +2 -2
- package/esm/4_constants.js +2 -2
- package/esm/client/0_message.js +9 -9
- package/esm/client/0_types.d.ts +1 -0
- package/esm/client/1_file_manager.js +1 -1
- package/esm/client/1_update_manager.js +33 -13
- package/esm/client/2_client_plain.js +4 -4
- package/esm/client/2_message_manager.d.ts +3 -2
- package/esm/client/2_message_manager.js +52 -36
- package/esm/client/4_client.d.ts +12 -1
- package/esm/client/4_client.js +24 -12
- package/esm/deps/deno.land/std@0.212.0/assert/_constants.js +2 -0
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/_diff.js +39 -18
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/_format.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_almost_equals.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_array_includes.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_equals.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_exists.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_false.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_greater.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_greater_or_equal.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_instance_of.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_is_error.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_less.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_less_or_equal.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_match.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_equals.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_instance_of.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_match.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_strict_equals.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_object_match.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_rejects.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_strict_equals.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_string_includes.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_throws.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assertion_error.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/equal.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/fail.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/mod.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/unimplemented.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/unreachable.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/encoding/_util.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/encoding/base64.js +1 -1
- package/{script/deps/deno.land/std@0.210.0 → esm/deps/deno.land/std@0.212.0}/fmt/colors.d.ts +16 -11
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/fmt/colors.js +14 -11
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/_db.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/_util.js +8 -6
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/content_type.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/extension.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/extensions_by_type.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/format_media_type.js +2 -2
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/get_charset.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/parse_media_type.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/type_by_extension.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/vendor/mime-db.v1.52.0.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/assert_path.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/basename.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/common.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/constants.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/dirname.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/format.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/from_file_url.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/glob_to_reg_exp.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/normalize.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/normalize_string.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/relative.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/strip_trailing_separators.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/to_file_url.js +1 -1
- package/esm/deps/deno.land/std@0.212.0/path/_interface.js +3 -0
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_os.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/basename.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/common.d.ts +2 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/common.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/dirname.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/extname.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/format.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/from_file_url.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/glob_to_regexp.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/is_absolute.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/is_glob.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/join.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/join_globs.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/mod.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/normalize.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/normalize_glob.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/parse.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/_util.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/basename.js +1 -1
- package/{script/deps/deno.land/std@0.210.0/path → esm/deps/deno.land/std@0.212.0/path/posix}/common.d.ts +2 -1
- package/esm/deps/deno.land/{std@0.210.0/path/windows → std@0.212.0/path/posix}/common.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/dirname.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/extname.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/format.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/from_file_url.d.ts +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/from_file_url.js +2 -2
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/glob_to_regexp.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/is_absolute.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/is_glob.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/join.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/join_globs.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/mod.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/normalize.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/normalize_glob.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/parse.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/relative.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/resolve.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/separator.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/to_file_url.d.ts +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/to_file_url.js +2 -2
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/to_namespaced_path.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/relative.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/resolve.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/separator.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/to_file_url.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/to_namespaced_path.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/_util.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/basename.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0/path/posix → std@0.212.0/path/windows}/common.d.ts +2 -1
- package/esm/deps/deno.land/{std@0.210.0/path/posix → std@0.212.0/path/windows}/common.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/dirname.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/extname.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/format.js +1 -1
- package/{script/deps/deno.land/std@0.210.0 → esm/deps/deno.land/std@0.212.0}/path/windows/from_file_url.d.ts +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/from_file_url.js +2 -2
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/glob_to_regexp.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/is_absolute.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/is_glob.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/join.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/join_globs.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/mod.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/normalize.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/normalize_glob.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/parse.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/relative.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/resolve.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/separator.js +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/to_file_url.d.ts +1 -1
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/to_file_url.js +2 -2
- package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/to_namespaced_path.js +1 -1
- package/esm/storage/0_storage.d.ts +3 -6
- package/esm/storage/0_storage.js +17 -17
- package/esm/tl/0_tl_raw_reader.js +3 -2
- package/esm/tl/0_tl_raw_writer.js +3 -3
- package/esm/tl/2_types.d.ts +218 -4
- package/esm/tl/2_types.js +632 -19
- package/esm/tl/3_functions.d.ts +232 -0
- package/esm/tl/3_functions.js +608 -4
- package/esm/transport/0_obfuscation.js +2 -2
- package/esm/transport/1_transport_abridged.js +1 -1
- package/esm/transport/1_transport_intermediate.js +1 -1
- package/esm/types/0__file_id.js +2 -2
- package/esm/types/0_chat_member_rights.d.ts +3 -0
- package/esm/types/0_chat_member_rights.js +45 -1
- package/esm/types/0_message_entity.d.ts +2 -1
- package/esm/types/0_message_entity.js +27 -4
- package/esm/types/1_chat_p.js +1 -1
- package/esm/types/2_chat_member.d.ts +46 -0
- package/esm/types/2_chat_member.js +89 -0
- package/esm/types/4_inline_query_result.d.ts +1 -1
- package/esm/types/4_inline_query_result.js +2 -2
- package/package.json +1 -1
- package/script/0_deps.d.ts +4 -4
- package/script/0_deps.js +5 -5
- package/script/3_types.d.ts +1 -0
- package/script/3_types.js +1 -0
- package/script/4_constants.d.ts +2 -2
- package/script/4_constants.js +2 -2
- package/script/client/0_message.js +9 -9
- package/script/client/0_types.d.ts +1 -0
- package/script/client/1_file_manager.js +1 -1
- package/script/client/1_update_manager.js +33 -13
- package/script/client/2_client_plain.js +4 -4
- package/script/client/2_message_manager.d.ts +3 -2
- package/script/client/2_message_manager.js +51 -35
- package/script/client/4_client.d.ts +12 -1
- package/script/client/4_client.js +24 -12
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/_constants.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/_diff.js +39 -18
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/_format.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_almost_equals.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_array_includes.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_equals.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_exists.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_false.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_greater.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_greater_or_equal.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_instance_of.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_is_error.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_less.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_less_or_equal.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_match.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_equals.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_instance_of.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_match.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_strict_equals.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_object_match.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_rejects.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_strict_equals.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_string_includes.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_throws.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assertion_error.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/equal.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/fail.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/mod.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/unimplemented.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/unreachable.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/encoding/_util.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/encoding/base64.js +1 -1
- package/{esm/deps/deno.land/std@0.210.0 → script/deps/deno.land/std@0.212.0}/fmt/colors.d.ts +16 -11
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/fmt/colors.js +14 -11
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/_db.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/_util.js +8 -6
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/content_type.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/extension.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/extensions_by_type.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/format_media_type.js +2 -2
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/get_charset.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/parse_media_type.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/type_by_extension.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/vendor/mime-db.v1.52.0.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/assert_path.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/basename.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/common.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/constants.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/dirname.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/format.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/from_file_url.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/glob_to_reg_exp.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/normalize.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/normalize_string.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/relative.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/strip_trailing_separators.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/to_file_url.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_interface.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_os.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/basename.js +1 -1
- package/{esm/deps/deno.land/std@0.210.0/path/windows → script/deps/deno.land/std@0.212.0/path}/common.d.ts +2 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/common.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/dirname.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/extname.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/format.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/from_file_url.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/glob_to_regexp.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/is_absolute.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/is_glob.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/join.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/join_globs.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/mod.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/normalize.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/normalize_glob.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/parse.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/_util.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/basename.js +1 -1
- package/script/deps/deno.land/std@0.212.0/path/posix/common.d.ts +14 -0
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/common.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/dirname.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/extname.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/format.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/from_file_url.d.ts +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/from_file_url.js +2 -2
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/glob_to_regexp.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/is_absolute.js +1 -1
- package/script/deps/deno.land/{std@0.210.0/path/windows → std@0.212.0/path/posix}/is_glob.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/join.js +1 -1
- package/script/deps/deno.land/{std@0.210.0/path/windows → std@0.212.0/path/posix}/join_globs.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/mod.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/normalize.js +1 -1
- package/script/deps/deno.land/{std@0.210.0/path/windows → std@0.212.0/path/posix}/normalize_glob.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/parse.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/relative.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/resolve.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/separator.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/to_file_url.d.ts +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/to_file_url.js +2 -2
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/to_namespaced_path.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/relative.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/resolve.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/separator.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/to_file_url.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/to_namespaced_path.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/_util.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/basename.js +1 -1
- package/script/deps/deno.land/std@0.212.0/path/windows/common.d.ts +14 -0
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/common.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/dirname.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/extname.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/format.js +1 -1
- package/{esm/deps/deno.land/std@0.210.0 → script/deps/deno.land/std@0.212.0}/path/windows/from_file_url.d.ts +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/from_file_url.js +2 -2
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/glob_to_regexp.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/is_absolute.js +1 -1
- package/script/deps/deno.land/{std@0.210.0/path/posix → std@0.212.0/path/windows}/is_glob.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/join.js +1 -1
- package/script/deps/deno.land/{std@0.210.0/path/posix → std@0.212.0/path/windows}/join_globs.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/mod.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/normalize.js +1 -1
- package/script/deps/deno.land/{std@0.210.0/path/posix → std@0.212.0/path/windows}/normalize_glob.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/parse.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/relative.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/resolve.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/separator.js +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/to_file_url.d.ts +1 -1
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/to_file_url.js +2 -2
- package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/to_namespaced_path.js +1 -1
- package/script/storage/0_storage.d.ts +3 -6
- package/script/storage/0_storage.js +17 -17
- package/script/tl/0_tl_raw_reader.js +3 -2
- package/script/tl/0_tl_raw_writer.js +3 -3
- package/script/tl/2_types.d.ts +218 -4
- package/script/tl/2_types.js +674 -44
- package/script/tl/3_functions.d.ts +232 -0
- package/script/tl/3_functions.js +629 -14
- package/script/transport/0_obfuscation.js +2 -2
- package/script/transport/1_transport_abridged.js +1 -1
- package/script/transport/1_transport_intermediate.js +1 -1
- package/script/types/0__file_id.js +2 -2
- package/script/types/0_chat_member_rights.d.ts +3 -0
- package/script/types/0_chat_member_rights.js +48 -0
- package/script/types/0_message_entity.d.ts +2 -1
- package/script/types/0_message_entity.js +27 -4
- package/script/types/1_chat_p.js +1 -1
- package/script/types/2_chat_member.d.ts +46 -0
- package/script/types/2_chat_member.js +93 -0
- package/script/types/4_inline_query_result.d.ts +1 -1
- package/script/types/4_inline_query_result.js +2 -2
- package/esm/deps/deno.land/std@0.210.0/assert/_constants.js +0 -2
- package/esm/deps/deno.land/std@0.210.0/path/_interface.js +0 -3
- package/script/deps/deno.land/std@0.210.0/path/posix/common.d.ts +0 -13
- package/script/deps/deno.land/std@0.210.0/path/windows/common.d.ts +0 -13
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/_constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/_diff.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/_format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_array_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_exists.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_false.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_greater.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_greater_or_equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_is_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_less.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_less_or_equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_object_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_rejects.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_string_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_throws.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assertion_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/fail.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/unimplemented.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/unreachable.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/encoding/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/encoding/base64.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/_db.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/content_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/extension.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/extensions_by_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/format_media_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/get_charset.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/parse_media_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/type_by_extension.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/vendor/mime-db.v1.52.0.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/assert_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/glob_to_reg_exp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/normalize_string.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_interface.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_os.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/separator.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/separator.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/separator.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/_constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/_diff.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/_format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_array_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_exists.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_false.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_greater.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_greater_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_is_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_less.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_less_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_object_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_rejects.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_string_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assert_throws.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/assertion_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/fail.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/unimplemented.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/assert/unreachable.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/encoding/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/encoding/base64.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/_db.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/content_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/extension.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/extensions_by_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/format_media_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/get_charset.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/parse_media_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/type_by_extension.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/media_types/vendor/mime-db.v1.52.0.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/assert_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/glob_to_reg_exp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/normalize_string.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_common/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_interface.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/_os.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/separator.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/separator.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/separator.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.210.0 → std@0.212.0}/path/windows/to_namespaced_path.d.ts +0 -0
package/esm/0_deps.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from "./deps/deno.land/std@0.
|
|
2
|
-
export * as path from "./deps/deno.land/std@0.
|
|
3
|
-
export { decodeBase64, encodeBase64 } from "./deps/deno.land/std@0.
|
|
4
|
-
export { contentType } from "./deps/deno.land/std@0.
|
|
1
|
+
export * from "./deps/deno.land/std@0.212.0/assert/mod.js";
|
|
2
|
+
export * as path from "./deps/deno.land/std@0.212.0/path/mod.js";
|
|
3
|
+
export { decodeBase64, encodeBase64 } from "./deps/deno.land/std@0.212.0/encoding/base64.js";
|
|
4
|
+
export { contentType } from "./deps/deno.land/std@0.212.0/media_types/content_type.js";
|
|
5
5
|
export declare function extension(mimeType: string): string;
|
|
6
6
|
export { ctr256, factorize, ige256Decrypt, ige256Encrypt, init as initTgCrypto } from "./deps/deno.land/x/tgcrypto@0.3.3/mod.js";
|
|
7
7
|
export { gunzip, gzip } from "./deps/raw.githubusercontent.com/MTKruto/compress/main/gzip/gzip.js";
|
package/esm/0_deps.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./deps/deno.land/std@0.
|
|
2
|
-
export * as path from "./deps/deno.land/std@0.
|
|
3
|
-
export { decodeBase64, encodeBase64 } from "./deps/deno.land/std@0.
|
|
4
|
-
export { contentType } from "./deps/deno.land/std@0.
|
|
5
|
-
import { extension as extension_ } from "./deps/deno.land/std@0.
|
|
1
|
+
export * from "./deps/deno.land/std@0.212.0/assert/mod.js";
|
|
2
|
+
export * as path from "./deps/deno.land/std@0.212.0/path/mod.js";
|
|
3
|
+
export { decodeBase64, encodeBase64 } from "./deps/deno.land/std@0.212.0/encoding/base64.js";
|
|
4
|
+
export { contentType } from "./deps/deno.land/std@0.212.0/media_types/content_type.js";
|
|
5
|
+
import { extension as extension_ } from "./deps/deno.land/std@0.212.0/media_types/extension.js";
|
|
6
6
|
export function extension(mimeType) {
|
|
7
7
|
if (mimeType == "application/x-tgsticker") {
|
|
8
8
|
return "tgs";
|
package/esm/3_types.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export * from "./types/1_sticker.js";
|
|
|
47
47
|
export * from "./types/1_user.js";
|
|
48
48
|
export * from "./types/1_video_note.js";
|
|
49
49
|
export * from "./types/1_video.js";
|
|
50
|
+
export * from "./types/2_chat_member.js";
|
|
50
51
|
export * from "./types/2_chosen_inline_result.js";
|
|
51
52
|
export * from "./types/2_game.js";
|
|
52
53
|
export * from "./types/2_inline_keyboard_button.js";
|
package/esm/3_types.js
CHANGED
|
@@ -47,6 +47,7 @@ export * from "./types/1_sticker.js";
|
|
|
47
47
|
export * from "./types/1_user.js";
|
|
48
48
|
export * from "./types/1_video_note.js";
|
|
49
49
|
export * from "./types/1_video.js";
|
|
50
|
+
export * from "./types/2_chat_member.js";
|
|
50
51
|
export * from "./types/2_chosen_inline_result.js";
|
|
51
52
|
export * from "./types/2_game.js";
|
|
52
53
|
export * from "./types/2_inline_keyboard_button.js";
|
package/esm/4_constants.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ export declare const ACK_THRESHOLD = 10;
|
|
|
3
3
|
export type PublicKeys = readonly [bigint, [bigint, bigint]][];
|
|
4
4
|
export declare const PUBLIC_KEYS: PublicKeys;
|
|
5
5
|
export declare const INITIAL_DC: DC;
|
|
6
|
-
export declare const LAYER =
|
|
7
|
-
export declare const APP_VERSION = "MTKruto 0.1.
|
|
6
|
+
export declare const LAYER = 172;
|
|
7
|
+
export declare const APP_VERSION = "MTKruto 0.1.145";
|
|
8
8
|
export declare const DEVICE_MODEL: string;
|
|
9
9
|
export declare const LANG_CODE: string;
|
|
10
10
|
export declare const LANG_PACK = "";
|
package/esm/4_constants.js
CHANGED
|
@@ -52,8 +52,8 @@ export const PUBLIC_KEYS = Object.freeze([
|
|
|
52
52
|
],
|
|
53
53
|
]);
|
|
54
54
|
export const INITIAL_DC = "2";
|
|
55
|
-
export const LAYER =
|
|
56
|
-
export const APP_VERSION = "MTKruto 0.1.
|
|
55
|
+
export const LAYER = 172;
|
|
56
|
+
export const APP_VERSION = "MTKruto 0.1.145";
|
|
57
57
|
// @ts-ignore: lib
|
|
58
58
|
export const DEVICE_MODEL = typeof dntShim.Deno === "undefined" ? typeof navigator === "undefined" ? typeof process === "undefined" ? "Unknown" : process.platform + "-" + process.arch : navigator.userAgent.split(" ")[0] : dntShim.Deno.build.os + "-" + dntShim.Deno.build.arch;
|
|
59
59
|
export const LANG_CODE = typeof navigator === "undefined" ? "en" : navigator.language.split("-")[0];
|
package/esm/client/0_message.js
CHANGED
|
@@ -39,11 +39,11 @@ export async function encryptMessage(message, authKey, authKeyId, salt, sessionI
|
|
|
39
39
|
payloadWriter.write(encoded);
|
|
40
40
|
payloadWriter.write(new Uint8Array(mod(-(payloadWriter.buffer.length + 12), 16) + 12));
|
|
41
41
|
const payload = payloadWriter.buffer;
|
|
42
|
-
const messageKey = (await sha256(concat(authKey.
|
|
43
|
-
const a = await sha256(concat(messageKey, authKey.
|
|
44
|
-
const b = await sha256(concat(authKey.
|
|
45
|
-
const aesKey = concat(a.
|
|
46
|
-
const aesIV = concat(b.
|
|
42
|
+
const messageKey = (await sha256(concat(authKey.subarray(88, 120), payload))).subarray(8, 24);
|
|
43
|
+
const a = await sha256(concat(messageKey, authKey.subarray(0, 36)));
|
|
44
|
+
const b = await sha256(concat(authKey.subarray(40, 76), messageKey));
|
|
45
|
+
const aesKey = concat(a.subarray(0, 8), b.subarray(8, 24), a.subarray(24, 32));
|
|
46
|
+
const aesIV = concat(b.subarray(0, 8), a.subarray(8, 24), b.subarray(24, 32));
|
|
47
47
|
const messageWriter = new TLWriter();
|
|
48
48
|
messageWriter.writeInt64(authKeyId);
|
|
49
49
|
messageWriter.write(messageKey);
|
|
@@ -55,10 +55,10 @@ export async function decryptMessage(buffer, authKey, authKeyId, _sessionId) {
|
|
|
55
55
|
assertEquals(reader.readInt64(false), authKeyId);
|
|
56
56
|
const messageKey_ = reader.readInt128();
|
|
57
57
|
const messageKey = bufferFromBigInt(messageKey_, 16, true, true);
|
|
58
|
-
const a = await sha256(concat(messageKey, authKey.
|
|
59
|
-
const b = await sha256(concat(authKey.
|
|
60
|
-
const aesKey = concat(a.
|
|
61
|
-
const aesIv = concat(b.
|
|
58
|
+
const a = await sha256(concat(messageKey, authKey.subarray(8, 44)));
|
|
59
|
+
const b = await sha256(concat(authKey.subarray(48, 84), messageKey));
|
|
60
|
+
const aesKey = concat(a.subarray(0, 8), b.subarray(8, 24), a.subarray(24, 32));
|
|
61
|
+
const aesIv = concat(b.subarray(0, 8), a.subarray(8, 24), b.subarray(24, 32));
|
|
62
62
|
const plaintext = ige256Decrypt(reader.buffer, aesKey, aesIv);
|
|
63
63
|
assertEquals(plaintext.buffer.byteLength % 4, 0);
|
|
64
64
|
let plainReader = new TLReader(plaintext);
|
package/esm/client/0_types.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ 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 _UpdateManager_instances, _a, _UpdateManager_c, _UpdateManager_updateState, _UpdateManager_updateHandler, _UpdateManager_handleUpdateQueues, _UpdateManager_checkGap, _UpdateManager_checkChannelGap, _UpdateManager_channelUpdateQueues, _UpdateManager_processChannelPtsUpdateInner, _UpdateManager_queueUpdate, _UpdateManager_processChannelPtsUpdate, _UpdateManager_processPtsUpdateInner, _UpdateManager_ptsUpdateQueue, _UpdateManager_processPtsUpdate, _UpdateManager_processUpdatesQueue, _UpdateManager_processUpdates, _UpdateManager_setUpdateStateDate, _UpdateManager_setUpdatePts, _UpdateManager_getLocalState, _UpdateManager_recoverChannelUpdateGap, _UpdateManager_handleUpdatesSet, _UpdateManager_handleStoredUpdates, _UpdateManager_handleUpdate;
|
|
12
|
+
var _UpdateManager_instances, _a, _UpdateManager_c, _UpdateManager_updateState, _UpdateManager_updateHandler, _UpdateManager_defaultDropPendingUpdates, _UpdateManager_mustDropPendingUpdates, _UpdateManager_handleUpdateQueues, _UpdateManager_nonFirst, _UpdateManager_getChannelPtsWithDropPendingUpdatesCheck, _UpdateManager_checkGap, _UpdateManager_checkChannelGap, _UpdateManager_channelUpdateQueues, _UpdateManager_processChannelPtsUpdateInner, _UpdateManager_queueUpdate, _UpdateManager_processChannelPtsUpdate, _UpdateManager_processPtsUpdateInner, _UpdateManager_ptsUpdateQueue, _UpdateManager_processPtsUpdate, _UpdateManager_processUpdatesQueue, _UpdateManager_processUpdates, _UpdateManager_setUpdateStateDate, _UpdateManager_setUpdatePts, _UpdateManager_getLocalState, _UpdateManager_recoverChannelUpdateGap, _UpdateManager_handleUpdatesSet, _UpdateManager_handleStoredUpdates, _UpdateManager_handleUpdate;
|
|
13
13
|
import { debug } from "../0_deps.js";
|
|
14
14
|
import { Queue, UNREACHABLE, ZERO_CHANNEL_ID } from "../1_utilities.js";
|
|
15
15
|
import { as, functions, inputPeerToPeer, peerToChatId, types } from "../2_tl.js";
|
|
@@ -24,7 +24,9 @@ export class UpdateManager {
|
|
|
24
24
|
_UpdateManager_c.set(this, void 0);
|
|
25
25
|
_UpdateManager_updateState.set(this, void 0);
|
|
26
26
|
_UpdateManager_updateHandler.set(this, void 0);
|
|
27
|
+
_UpdateManager_defaultDropPendingUpdates.set(this, null);
|
|
27
28
|
_UpdateManager_handleUpdateQueues.set(this, new Map());
|
|
29
|
+
_UpdateManager_nonFirst.set(this, new Set());
|
|
28
30
|
_UpdateManager_channelUpdateQueues.set(this, new Map());
|
|
29
31
|
_UpdateManager_ptsUpdateQueue.set(this, new Queue("ptsUpdate"));
|
|
30
32
|
_UpdateManager_processUpdatesQueue.set(this, new Queue("UpdateManager/processUpdates"));
|
|
@@ -35,25 +37,24 @@ export class UpdateManager {
|
|
|
35
37
|
const state = await __classPrivateFieldGet(this, _UpdateManager_c, "f").api.updates.getState();
|
|
36
38
|
__classPrivateFieldSet(this, _UpdateManager_updateState, state, "f");
|
|
37
39
|
d("state fetched [%s]", source);
|
|
40
|
+
if (await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_mustDropPendingUpdates).call(this)) {
|
|
41
|
+
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.setState(state);
|
|
42
|
+
}
|
|
38
43
|
}
|
|
39
44
|
async processChats(chats) {
|
|
40
45
|
for (const chat of chats) {
|
|
41
|
-
if (chat instanceof types.Channel
|
|
46
|
+
if (chat instanceof types.Channel || chat instanceof types.ChannelForbidden) {
|
|
42
47
|
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.setEntity(chat);
|
|
43
|
-
|
|
44
|
-
if (chat.username) {
|
|
48
|
+
if ("username" in chat && chat.username) {
|
|
45
49
|
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.updateUsernames("channel", chat.id, [chat.username]);
|
|
46
50
|
}
|
|
47
|
-
if (chat.usernames) {
|
|
51
|
+
if ("usernames" in chat && chat.usernames) {
|
|
48
52
|
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.updateUsernames("channel", chat.id, chat.usernames.map((v) => v.username));
|
|
49
53
|
}
|
|
50
54
|
}
|
|
51
|
-
else if (chat instanceof types.Chat) {
|
|
55
|
+
else if (chat instanceof types.Chat || chat instanceof types.ChatForbidden) {
|
|
52
56
|
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.setEntity(chat);
|
|
53
57
|
}
|
|
54
|
-
else if (chat instanceof types.ChannelForbidden || chat instanceof types.ChatForbidden) {
|
|
55
|
-
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.removeEntity(chat);
|
|
56
|
-
}
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
60
|
async processResult(result) {
|
|
@@ -117,7 +118,6 @@ export class UpdateManager {
|
|
|
117
118
|
for (const user of users) {
|
|
118
119
|
if (user instanceof types.User && user.access_hash) {
|
|
119
120
|
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.setEntity(user);
|
|
120
|
-
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.setUserAccessHash(user.id, user.access_hash);
|
|
121
121
|
if (user.username) {
|
|
122
122
|
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.updateUsernames("user", user.id, [user.username]);
|
|
123
123
|
}
|
|
@@ -193,13 +193,33 @@ export class UpdateManager {
|
|
|
193
193
|
__classPrivateFieldSet(this, _UpdateManager_updateHandler, handler, "f");
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
|
-
_a = UpdateManager, _UpdateManager_c = new WeakMap(), _UpdateManager_updateState = new WeakMap(), _UpdateManager_updateHandler = new WeakMap(), _UpdateManager_handleUpdateQueues = new WeakMap(), _UpdateManager_channelUpdateQueues = new WeakMap(), _UpdateManager_ptsUpdateQueue = new WeakMap(), _UpdateManager_processUpdatesQueue = new WeakMap(), _UpdateManager_handleUpdatesSet = new WeakMap(), _UpdateManager_instances = new WeakSet(),
|
|
196
|
+
_a = UpdateManager, _UpdateManager_c = new WeakMap(), _UpdateManager_updateState = new WeakMap(), _UpdateManager_updateHandler = new WeakMap(), _UpdateManager_defaultDropPendingUpdates = new WeakMap(), _UpdateManager_handleUpdateQueues = new WeakMap(), _UpdateManager_nonFirst = new WeakMap(), _UpdateManager_channelUpdateQueues = new WeakMap(), _UpdateManager_ptsUpdateQueue = new WeakMap(), _UpdateManager_processUpdatesQueue = new WeakMap(), _UpdateManager_handleUpdatesSet = new WeakMap(), _UpdateManager_instances = new WeakSet(), _UpdateManager_mustDropPendingUpdates = async function _UpdateManager_mustDropPendingUpdates() {
|
|
197
|
+
if (typeof __classPrivateFieldGet(this, _UpdateManager_c, "f").dropPendingUpdates === "boolean") {
|
|
198
|
+
return __classPrivateFieldGet(this, _UpdateManager_c, "f").dropPendingUpdates;
|
|
199
|
+
}
|
|
200
|
+
if (__classPrivateFieldGet(this, _UpdateManager_defaultDropPendingUpdates, "f") == null) {
|
|
201
|
+
__classPrivateFieldSet(this, _UpdateManager_defaultDropPendingUpdates, await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.getAccountType() == "bot", "f");
|
|
202
|
+
}
|
|
203
|
+
return __classPrivateFieldGet(this, _UpdateManager_defaultDropPendingUpdates, "f");
|
|
204
|
+
}, _UpdateManager_getChannelPtsWithDropPendingUpdatesCheck = async function _UpdateManager_getChannelPtsWithDropPendingUpdatesCheck(channelId) {
|
|
205
|
+
if (!(await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_mustDropPendingUpdates).call(this))) {
|
|
206
|
+
return await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.getChannelPts(channelId);
|
|
207
|
+
}
|
|
208
|
+
const first = !__classPrivateFieldGet(this, _UpdateManager_nonFirst, "f").has(channelId);
|
|
209
|
+
if (first) {
|
|
210
|
+
__classPrivateFieldGet(this, _UpdateManager_nonFirst, "f").add(channelId);
|
|
211
|
+
return null;
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
return await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.getChannelPts(channelId);
|
|
215
|
+
}
|
|
216
|
+
}, _UpdateManager_checkGap = async function _UpdateManager_checkGap(pts, ptsCount) {
|
|
197
217
|
const localState = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_getLocalState).call(this);
|
|
198
218
|
if (localState.pts + ptsCount < pts) {
|
|
199
219
|
await this.recoverUpdateGap("processUpdates");
|
|
200
220
|
}
|
|
201
221
|
}, _UpdateManager_checkChannelGap = async function _UpdateManager_checkChannelGap(channelId, pts, ptsCount) {
|
|
202
|
-
let localPts = await __classPrivateFieldGet(this,
|
|
222
|
+
let localPts = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_getChannelPtsWithDropPendingUpdatesCheck).call(this, channelId);
|
|
203
223
|
if (!localPts) {
|
|
204
224
|
localPts = pts - ptsCount;
|
|
205
225
|
}
|
|
@@ -220,7 +240,7 @@ _a = UpdateManager, _UpdateManager_c = new WeakMap(), _UpdateManager_updateState
|
|
|
220
240
|
if (checkGap) {
|
|
221
241
|
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_checkChannelGap).call(this, channelId, update.pts, ptsCount);
|
|
222
242
|
}
|
|
223
|
-
let currentPts = await __classPrivateFieldGet(this,
|
|
243
|
+
let currentPts = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_getChannelPtsWithDropPendingUpdatesCheck).call(this, channelId);
|
|
224
244
|
currentPts ??= update.pts - ptsCount;
|
|
225
245
|
if (currentPts + ptsCount > update.pts) {
|
|
226
246
|
return;
|
|
@@ -106,8 +106,8 @@ export class ClientPlain extends ClientAbstract {
|
|
|
106
106
|
d("got server_DH_params_ok");
|
|
107
107
|
const newNonce_ = bufferFromBigInt(newNonce, 32, true, true);
|
|
108
108
|
const serverNonce_ = bufferFromBigInt(serverNonce, 16, true, true);
|
|
109
|
-
const tmpAesKey = concat(await sha1(concat(newNonce_, serverNonce_)), (await sha1(concat(serverNonce_, newNonce_))).
|
|
110
|
-
const tmpAesIv = concat((await sha1(concat(serverNonce_, newNonce_))).
|
|
109
|
+
const tmpAesKey = concat(await sha1(concat(newNonce_, serverNonce_)), (await sha1(concat(serverNonce_, newNonce_))).subarray(0, 0 + 12));
|
|
110
|
+
const tmpAesIv = concat((await sha1(concat(serverNonce_, newNonce_))).subarray(12, 12 + 8), await sha1(concat(newNonce_, newNonce_)), newNonce_.subarray(0, 0 + 4));
|
|
111
111
|
const answerWithHash = ige256Decrypt(dhParams.encrypted_answer, tmpAesKey, tmpAesIv);
|
|
112
112
|
const dhInnerData = new TLReader(answerWithHash.slice(20)).readObject();
|
|
113
113
|
assertInstanceOf(dhInnerData, types.Server_DH_inner_data);
|
|
@@ -130,8 +130,8 @@ export class ClientPlain extends ClientAbstract {
|
|
|
130
130
|
const dhGenOk = await this.invoke(new functions.set_client_DH_params({ nonce, server_nonce: serverNonce, encrypted_data: encryptedData }));
|
|
131
131
|
assertInstanceOf(dhGenOk, types.Dh_gen_ok);
|
|
132
132
|
d("got dh_gen_ok");
|
|
133
|
-
const serverNonceSlice = serverNonce_.
|
|
134
|
-
const salt = newNonce_.
|
|
133
|
+
const serverNonceSlice = serverNonce_.subarray(0, 8);
|
|
134
|
+
const salt = newNonce_.subarray(0, 0 + 8).map((v, i) => v ^ serverNonceSlice[i]);
|
|
135
135
|
const authKey_ = modExp(gA, b, dhPrime);
|
|
136
136
|
const authKey = bufferFromBigInt(authKey_, 256, false, false);
|
|
137
137
|
d("auth key created");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { enums, types } from "../2_tl.js";
|
|
2
|
-
import { ChatAction, FileSource, ID, Message, MessageEntity, ParseMode, Reaction, Update, UsernameResolver } from "../3_types.js";
|
|
2
|
+
import { ChatAction, ChatMember, FileSource, ID, Message, MessageEntity, ParseMode, Reaction, Update, UsernameResolver } from "../3_types.js";
|
|
3
3
|
import { BanChatMemberParams, DeleteMessagesParams, EditMessageParams, EditMessageReplyMarkupParams, ForwardMessagesParams, GetHistoryParams, PinMessageParams, SendAnimationParams, SendAudioParams, SendContactParams, SendDiceParams, SendDocumentParams, SendLocationParams, SendMessageParams, SendPhotoParams, SendPollParams, SendVenueParams, SendVideoNoteParams, SendVideoParams, SendVoiceParams, SetChatMemberRightsParams, SetChatPhotoParams } from "./0_params.js";
|
|
4
4
|
import { AddReactionParams, SetReactionsParams } from "./0_params.js";
|
|
5
5
|
import { C as C_ } from "./0_types.js";
|
|
@@ -16,7 +16,7 @@ export declare class MessageManager {
|
|
|
16
16
|
parseText(text: string, params?: {
|
|
17
17
|
parseMode?: ParseMode;
|
|
18
18
|
entities?: MessageEntity[];
|
|
19
|
-
}): readonly [string, (import("../tl/2_types.js").MessageEntityMention_ | import("../tl/2_types.js").MessageEntityHashtag_ | import("../tl/2_types.js").MessageEntityBotCommand_ | import("../tl/2_types.js").MessageEntityUrl_ | import("../tl/2_types.js").MessageEntityEmail_ | import("../tl/2_types.js").MessageEntityBold_ | import("../tl/2_types.js").MessageEntityItalic_ | import("../tl/2_types.js").MessageEntityCode_ | import("../tl/2_types.js").MessageEntityPre_ | import("../tl/2_types.js").MessageEntityTextUrl_ | import("../tl/2_types.js").
|
|
19
|
+
}): Promise<readonly [string, (import("../tl/2_types.js").MessageEntityMention_ | import("../tl/2_types.js").MessageEntityHashtag_ | import("../tl/2_types.js").MessageEntityBotCommand_ | import("../tl/2_types.js").MessageEntityUrl_ | import("../tl/2_types.js").MessageEntityEmail_ | import("../tl/2_types.js").MessageEntityBold_ | import("../tl/2_types.js").MessageEntityItalic_ | import("../tl/2_types.js").MessageEntityCode_ | import("../tl/2_types.js").MessageEntityPre_ | import("../tl/2_types.js").MessageEntityTextUrl_ | import("../tl/2_types.js").InputMessageEntityMentionName_ | import("../tl/2_types.js").MessageEntityPhone_ | import("../tl/2_types.js").MessageEntityCashtag_ | import("../tl/2_types.js").MessageEntityUnderline_ | import("../tl/2_types.js").MessageEntityStrike_ | import("../tl/2_types.js").MessageEntityBankCard_ | import("../tl/2_types.js").MessageEntitySpoiler_ | import("../tl/2_types.js").MessageEntityCustomEmoji_ | import("../tl/2_types.js").MessageEntityBlockquote_)[] | undefined]>;
|
|
20
20
|
getStickerSetName(inputStickerSet: types.InputStickerSetID, hash?: number): Promise<string>;
|
|
21
21
|
constructMessage(message_: enums.Message, r?: boolean): Promise<Message>;
|
|
22
22
|
forwardMessages(from: ID, to: ID, messageIds: number[], params?: ForwardMessagesParams): Promise<Message[]>;
|
|
@@ -56,5 +56,6 @@ export declare class MessageManager {
|
|
|
56
56
|
banChatMember(chatId: ID, memberId: ID, params?: BanChatMemberParams): Promise<void>;
|
|
57
57
|
unbanChatMember(chatId: ID, memberId: ID): Promise<void>;
|
|
58
58
|
setChatMemberRights(chatId: ID, memberId: ID, params?: SetChatMemberRightsParams): Promise<void>;
|
|
59
|
+
getChatAdministrators(chatId: ID): Promise<ChatMember[]>;
|
|
59
60
|
}
|
|
60
61
|
export {};
|
|
@@ -13,7 +13,7 @@ var _MessageManager_instances, _MessageManager_c, _MessageManager_updatesToMessa
|
|
|
13
13
|
import { contentType, debug } from "../0_deps.js";
|
|
14
14
|
import { getRandomId, toUnixTimestamp, UNREACHABLE } from "../1_utilities.js";
|
|
15
15
|
import { as, getChannelChatId, peerToChatId, types } from "../2_tl.js";
|
|
16
|
-
import { assertMessageType, constructMessage as constructMessage_, FileID, FileType, messageEntityToTlObject, reactionEqual, reactionToTlObject, replyMarkupToTlObject } from "../3_types.js";
|
|
16
|
+
import { assertMessageType, chatMemberRightsToTlObject, constructChatMember, constructMessage as constructMessage_, FileID, FileType, messageEntityToTlObject, reactionEqual, reactionToTlObject, replyMarkupToTlObject } from "../3_types.js";
|
|
17
17
|
import { STICKER_SET_NAME_TTL } from "../4_constants.js";
|
|
18
18
|
import { parseHtml } from "./0_html.js";
|
|
19
19
|
import { getFileContents, isHttpUrl } from "./0_utilities.js";
|
|
@@ -83,7 +83,7 @@ export class MessageManager {
|
|
|
83
83
|
const messages = await this.getMessages(chatId, [messageId]);
|
|
84
84
|
return messages[0] ?? null;
|
|
85
85
|
}
|
|
86
|
-
parseText(text, params) {
|
|
86
|
+
async parseText(text, params) {
|
|
87
87
|
const entities_ = params?.entities ?? [];
|
|
88
88
|
const parseMode = params?.parseMode ?? __classPrivateFieldGet(this, _MessageManager_c, "f").parseMode;
|
|
89
89
|
switch (parseMode) {
|
|
@@ -100,7 +100,7 @@ export class MessageManager {
|
|
|
100
100
|
default:
|
|
101
101
|
UNREACHABLE();
|
|
102
102
|
}
|
|
103
|
-
const entities = entities_?.length > 0 ? entities_.map((v) => messageEntityToTlObject(v)) : undefined;
|
|
103
|
+
const entities = entities_?.length > 0 ? await Promise.all(entities_.map((v) => messageEntityToTlObject(v, __classPrivateFieldGet(this, _MessageManager_c, "f").getEntity))) : undefined;
|
|
104
104
|
return [text, entities];
|
|
105
105
|
}
|
|
106
106
|
async getStickerSetName(inputStickerSet, hash = 0) {
|
|
@@ -177,7 +177,7 @@ export class MessageManager {
|
|
|
177
177
|
return messages;
|
|
178
178
|
}
|
|
179
179
|
async sendMessage(chatId, text, params) {
|
|
180
|
-
const [message, entities] = this.parseText(text, params);
|
|
180
|
+
const [message, entities] = await this.parseText(text, params);
|
|
181
181
|
const replyMarkup = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params);
|
|
182
182
|
const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
|
|
183
183
|
const randomId = getRandomId();
|
|
@@ -192,7 +192,7 @@ export class MessageManager {
|
|
|
192
192
|
no_webpage: noWebpage,
|
|
193
193
|
silent,
|
|
194
194
|
noforwards,
|
|
195
|
-
reply_to: __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
|
|
195
|
+
reply_to: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
|
|
196
196
|
send_as: sendAs,
|
|
197
197
|
entities,
|
|
198
198
|
reply_markup: replyMarkup,
|
|
@@ -212,7 +212,7 @@ export class MessageManager {
|
|
|
212
212
|
random_id: randomId,
|
|
213
213
|
silent,
|
|
214
214
|
noforwards,
|
|
215
|
-
reply_to: __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
|
|
215
|
+
reply_to: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
|
|
216
216
|
send_as: sendAs,
|
|
217
217
|
reply_markup: replyMarkup,
|
|
218
218
|
media: new types.InputMediaVenue({
|
|
@@ -243,7 +243,7 @@ export class MessageManager {
|
|
|
243
243
|
random_id: randomId,
|
|
244
244
|
silent,
|
|
245
245
|
noforwards,
|
|
246
|
-
reply_to: __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
|
|
246
|
+
reply_to: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
|
|
247
247
|
send_as: sendAs,
|
|
248
248
|
reply_markup: replyMarkup,
|
|
249
249
|
media: new types.InputMediaContact({
|
|
@@ -269,7 +269,7 @@ export class MessageManager {
|
|
|
269
269
|
random_id: randomId,
|
|
270
270
|
silent,
|
|
271
271
|
noforwards,
|
|
272
|
-
reply_to: __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
|
|
272
|
+
reply_to: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
|
|
273
273
|
send_as: sendAs,
|
|
274
274
|
reply_markup: replyMarkup,
|
|
275
275
|
media: new types.InputMediaDice({
|
|
@@ -292,7 +292,7 @@ export class MessageManager {
|
|
|
292
292
|
random_id: randomId,
|
|
293
293
|
silent,
|
|
294
294
|
noforwards,
|
|
295
|
-
reply_to: __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
|
|
295
|
+
reply_to: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
|
|
296
296
|
send_as: sendAs,
|
|
297
297
|
reply_markup: replyMarkup,
|
|
298
298
|
media: params?.livePeriod !== undefined
|
|
@@ -408,7 +408,7 @@ export class MessageManager {
|
|
|
408
408
|
const sendAs = params?.sendAs ? await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(params.sendAs) : undefined; // TODO: check default sendAs
|
|
409
409
|
const replyMarkup = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params);
|
|
410
410
|
const explanation = params?.explanation;
|
|
411
|
-
const parseResult = explanation !== undefined ? this.parseText(explanation, { parseMode: params?.explanationParseMode, entities: params?.explanationEntities }) : undefined;
|
|
411
|
+
const parseResult = explanation !== undefined ? await this.parseText(explanation, { parseMode: params?.explanationParseMode, entities: params?.explanationEntities }) : undefined;
|
|
412
412
|
const solution = parseResult === undefined ? undefined : parseResult[0];
|
|
413
413
|
const solutionEntities = parseResult === undefined ? undefined : parseResult[1];
|
|
414
414
|
const answers = options.map((v, i) => new types.PollAnswer({ option: new Uint8Array([i]), text: v }));
|
|
@@ -435,7 +435,7 @@ export class MessageManager {
|
|
|
435
435
|
silent,
|
|
436
436
|
noforwards,
|
|
437
437
|
reply_markup: replyMarkup,
|
|
438
|
-
reply_to: __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
|
|
438
|
+
reply_to: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
|
|
439
439
|
send_as: sendAs,
|
|
440
440
|
media,
|
|
441
441
|
message: "",
|
|
@@ -453,7 +453,7 @@ export class MessageManager {
|
|
|
453
453
|
return message_;
|
|
454
454
|
}
|
|
455
455
|
async editMessageText(chatId, messageId, text, params) {
|
|
456
|
-
const [message, entities] = this.parseText(text, params);
|
|
456
|
+
const [message, entities] = await this.parseText(text, params);
|
|
457
457
|
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").api.messages.editMessage({
|
|
458
458
|
id: messageId,
|
|
459
459
|
peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId),
|
|
@@ -718,28 +718,44 @@ export class MessageManager {
|
|
|
718
718
|
await __classPrivateFieldGet(this, _MessageManager_c, "f").api.channels.editBanned({
|
|
719
719
|
channel: new types.InputChannel(chat),
|
|
720
720
|
participant: member,
|
|
721
|
-
banned_rights:
|
|
722
|
-
until_date: params?.untilDate ? toUnixTimestamp(params.untilDate) : 0,
|
|
723
|
-
send_messages: params?.rights?.canSendMessages ? true : undefined,
|
|
724
|
-
send_audios: params?.rights?.canSendAudio ? true : undefined,
|
|
725
|
-
send_docs: params?.rights?.canSendDocuments ? true : undefined,
|
|
726
|
-
send_photos: params?.rights?.canSendPhotos ? true : undefined,
|
|
727
|
-
send_videos: params?.rights?.canSendVideos ? true : undefined,
|
|
728
|
-
send_roundvideos: params?.rights?.canSendVideoNotes ? true : undefined,
|
|
729
|
-
send_voices: params?.rights?.canSendVoice ? true : undefined,
|
|
730
|
-
send_polls: params?.rights?.canSendPolls ? true : undefined,
|
|
731
|
-
send_stickers: params?.rights?.canSendStickers ? true : undefined,
|
|
732
|
-
send_gifs: params?.rights?.canSendAnimations ? true : undefined,
|
|
733
|
-
send_games: params?.rights?.canSendGames ? true : undefined,
|
|
734
|
-
send_inline: params?.rights?.canSendInlineBotResults ? true : undefined,
|
|
735
|
-
embed_links: params?.rights?.canAddWebPagePreviews ? true : undefined,
|
|
736
|
-
change_info: params?.rights?.canChangeInfo ? true : undefined,
|
|
737
|
-
invite_users: params?.rights?.canInviteUsers ? true : undefined,
|
|
738
|
-
pin_messages: params?.rights?.canPinMessages ? true : undefined,
|
|
739
|
-
manage_topics: params?.rights?.canManageTopics ? true : undefined,
|
|
740
|
-
}),
|
|
721
|
+
banned_rights: chatMemberRightsToTlObject(params?.rights, params?.untilDate),
|
|
741
722
|
});
|
|
742
723
|
}
|
|
724
|
+
async getChatAdministrators(chatId) {
|
|
725
|
+
const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
|
|
726
|
+
if (peer instanceof types.InputPeerChannel) {
|
|
727
|
+
const channel = new types.InputChannel(peer);
|
|
728
|
+
const participants = await __classPrivateFieldGet(this, _MessageManager_c, "f").api.channels.getParticipants({
|
|
729
|
+
channel,
|
|
730
|
+
filter: new types.ChannelParticipantsAdmins(),
|
|
731
|
+
offset: 0,
|
|
732
|
+
limit: 100,
|
|
733
|
+
hash: 0n,
|
|
734
|
+
});
|
|
735
|
+
if (participants instanceof types.channels.ChannelParticipantsNotModified) {
|
|
736
|
+
UNREACHABLE();
|
|
737
|
+
}
|
|
738
|
+
const chatMembers = new Array();
|
|
739
|
+
for (const p of participants.participants) {
|
|
740
|
+
chatMembers.push(await constructChatMember(p, __classPrivateFieldGet(this, _MessageManager_c, "f").getEntity));
|
|
741
|
+
}
|
|
742
|
+
return chatMembers;
|
|
743
|
+
}
|
|
744
|
+
else if (peer instanceof types.InputPeerChat) {
|
|
745
|
+
const fullChat = await __classPrivateFieldGet(this, _MessageManager_c, "f").api.messages.getFullChat(peer); // TODO: full chat cache
|
|
746
|
+
if (!(fullChat.full_chat instanceof types.ChatFull) || !(fullChat.full_chat.participants instanceof types.ChatParticipants)) {
|
|
747
|
+
UNREACHABLE();
|
|
748
|
+
}
|
|
749
|
+
const chatMembers = new Array();
|
|
750
|
+
for (const p of fullChat.full_chat.participants.participants) {
|
|
751
|
+
chatMembers.push(await constructChatMember(p, __classPrivateFieldGet(this, _MessageManager_c, "f").getEntity));
|
|
752
|
+
}
|
|
753
|
+
return chatMembers;
|
|
754
|
+
}
|
|
755
|
+
else {
|
|
756
|
+
UNREACHABLE();
|
|
757
|
+
}
|
|
758
|
+
}
|
|
743
759
|
}
|
|
744
760
|
_MessageManager_c = new WeakMap(), _MessageManager_instances = new WeakSet(), _MessageManager_updatesToMessages = async function _MessageManager_updatesToMessages(chatId, updates) {
|
|
745
761
|
const messages = new Array();
|
|
@@ -774,10 +790,10 @@ _MessageManager_c = new WeakMap(), _MessageManager_instances = new WeakSet(), _M
|
|
|
774
790
|
await __classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertUser("sendAs");
|
|
775
791
|
return sendAs ? await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(sendAs) : undefined;
|
|
776
792
|
}
|
|
777
|
-
}, _MessageManager_constructReplyTo = function _MessageManager_constructReplyTo(params) {
|
|
793
|
+
}, _MessageManager_constructReplyTo = async function _MessageManager_constructReplyTo(params) {
|
|
778
794
|
const topMsgId = params?.messageThreadId;
|
|
779
795
|
const replyToMsgId = params?.replyToMessageId;
|
|
780
|
-
return replyToMsgId !== undefined ? new types.InputReplyToMessage({ reply_to_msg_id: replyToMsgId, top_msg_id: topMsgId, quote_text: params?.replyQuote?.text, quote_entities: params?.replyQuote?.entities.map(messageEntityToTlObject), quote_offset: params?.replyQuote?.offset }) : undefined;
|
|
796
|
+
return replyToMsgId !== undefined ? new types.InputReplyToMessage({ reply_to_msg_id: replyToMsgId, top_msg_id: topMsgId, quote_text: params?.replyQuote?.text, quote_entities: await Promise.all(params?.replyQuote?.entities.map((v) => messageEntityToTlObject(v, __classPrivateFieldGet(this, _MessageManager_c, "f").getEntity)) ?? []), quote_offset: params?.replyQuote?.offset }) : undefined;
|
|
781
797
|
}, _MessageManager_sendDocumentInner = async function _MessageManager_sendDocumentInner(chatId, document, params, fileType, otherAttribs, urlSupported = false) {
|
|
782
798
|
let media = null;
|
|
783
799
|
const spoiler = params?.hasSpoiler ? true : undefined;
|
|
@@ -826,7 +842,7 @@ _MessageManager_c = new WeakMap(), _MessageManager_instances = new WeakSet(), _M
|
|
|
826
842
|
const sendAs = params?.sendAs ? await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(params.sendAs) : undefined; // TODO: check default sendAs
|
|
827
843
|
const replyMarkup = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params);
|
|
828
844
|
const caption_ = params?.caption;
|
|
829
|
-
const parseResult = caption_ !== undefined ? this.parseText(caption_, { parseMode: params?.parseMode, entities: params?.captionEntities }) : undefined;
|
|
845
|
+
const parseResult = caption_ !== undefined ? await this.parseText(caption_, { parseMode: params?.parseMode, entities: params?.captionEntities }) : undefined;
|
|
830
846
|
const caption = parseResult === undefined ? undefined : parseResult[0];
|
|
831
847
|
const captionEntities = parseResult === undefined ? undefined : parseResult[1];
|
|
832
848
|
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").api.messages.sendMedia({
|
|
@@ -835,7 +851,7 @@ _MessageManager_c = new WeakMap(), _MessageManager_instances = new WeakSet(), _M
|
|
|
835
851
|
silent,
|
|
836
852
|
noforwards,
|
|
837
853
|
reply_markup: replyMarkup,
|
|
838
|
-
reply_to: __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
|
|
854
|
+
reply_to: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyTo).call(this, params),
|
|
839
855
|
send_as: sendAs,
|
|
840
856
|
media,
|
|
841
857
|
message: caption ?? "",
|
package/esm/client/4_client.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { MaybePromise } from "../1_utilities.js";
|
|
|
2
2
|
import { functions, types } from "../2_tl.js";
|
|
3
3
|
import { Storage } from "../3_storage.js";
|
|
4
4
|
import { DC } from "../3_transport.js";
|
|
5
|
-
import { BotCommand, Chat, ChatAction, ChatP, Document, FileSource, ID, InlineQueryResult, Message, MessageAnimation, MessageAudio, MessageContact, MessageDice, MessageDocument, MessageLocation, MessagePhoto, MessagePoll, MessageText, MessageVenue, MessageVideo, MessageVideoNote, MessageVoice, NetworkStatistics, ParseMode, Reaction, Update, UpdateIntersection, User } from "../3_types.js";
|
|
5
|
+
import { BotCommand, Chat, ChatAction, ChatMember, ChatP, Document, FileSource, ID, InlineQueryResult, Message, MessageAnimation, MessageAudio, MessageContact, MessageDice, MessageDocument, MessageLocation, MessagePhoto, MessagePoll, MessageText, MessageVenue, MessageVideo, MessageVideoNote, MessageVoice, NetworkStatistics, ParseMode, Reaction, Update, UpdateIntersection, User } from "../3_types.js";
|
|
6
6
|
import { Migrate } from "../4_errors.js";
|
|
7
7
|
import { ClientAbstract } from "./0_client_abstract.js";
|
|
8
8
|
import { FilterQuery, WithFilter } from "./0_filters.js";
|
|
@@ -74,6 +74,8 @@ export interface Context {
|
|
|
74
74
|
kickSender: () => Promise<void>;
|
|
75
75
|
/** Set the rights of the received message. */
|
|
76
76
|
setSenderRights: (params?: SetChatMemberRightsParams) => Promise<void>;
|
|
77
|
+
/** Get the administrators of the chat which the message was received from. */
|
|
78
|
+
getChatAdministrators: () => Promise<ChatMember[]>;
|
|
77
79
|
/** Change the reactions made to the received message. */
|
|
78
80
|
react: (reactions: Reaction[], params?: SetReactionsParams) => Promise<void>;
|
|
79
81
|
/** Send a chat action to the chat which the message was received from. */
|
|
@@ -156,6 +158,8 @@ export interface ClientParams extends ClientPlainParams {
|
|
|
156
158
|
prefixes?: string | string[];
|
|
157
159
|
/** Whether to guarantee that order-sensitive updates are delivered at least once before delivering next ones. Useful mainly for clients providing a user interface à la Telegram Desktop. Defaults to `false`. */
|
|
158
160
|
guaranteeUpdateDelivery?: boolean;
|
|
161
|
+
/** Whether to not handle updates received when the client was not running. Defaults to `true` for bots, and `false` for users. */
|
|
162
|
+
dropPendingUpdates?: boolean;
|
|
159
163
|
}
|
|
160
164
|
export declare class Client<C extends Context = Context> extends ClientAbstract {
|
|
161
165
|
#private;
|
|
@@ -694,5 +698,12 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
|
|
|
694
698
|
* @param memberId The identifier of a member.
|
|
695
699
|
*/
|
|
696
700
|
setChatMemberRights(chatId: ID, memberId: ID, params?: SetChatMemberRightsParams): Promise<void>;
|
|
701
|
+
/**
|
|
702
|
+
* Get the administrators of a chat.
|
|
703
|
+
*
|
|
704
|
+
* @method
|
|
705
|
+
* @param chatId The identifier of the chat.
|
|
706
|
+
*/
|
|
707
|
+
getChatAdministrators(chatId: ID): Promise<ChatMember[]>;
|
|
697
708
|
}
|
|
698
709
|
export {};
|
package/esm/client/4_client.js
CHANGED
|
@@ -323,6 +323,10 @@ export class Client extends ClientAbstract {
|
|
|
323
323
|
}
|
|
324
324
|
return this.setChatMemberRights(chatId, senderId, params);
|
|
325
325
|
},
|
|
326
|
+
getChatAdministrators: () => {
|
|
327
|
+
const { chatId } = mustGetMsg();
|
|
328
|
+
return this.getChatAdministrators(chatId);
|
|
329
|
+
},
|
|
326
330
|
react: (reactions, params) => {
|
|
327
331
|
const { chatId, messageId } = mustGetMsg();
|
|
328
332
|
return this.setReactions(chatId, messageId, reactions, params);
|
|
@@ -562,6 +566,7 @@ export class Client extends ClientAbstract {
|
|
|
562
566
|
},
|
|
563
567
|
cdn: params?.cdn ?? false,
|
|
564
568
|
ignoreOutgoing: __classPrivateFieldGet(this, _Client_ignoreOutgoing, "f"),
|
|
569
|
+
dropPendingUpdates: params?.dropPendingUpdates,
|
|
565
570
|
};
|
|
566
571
|
__classPrivateFieldSet(this, _Client_updateManager, new UpdateManager(c), "f");
|
|
567
572
|
__classPrivateFieldSet(this, _Client_networkStatisticsManager, new NetworkStatisticsManager(c), "f");
|
|
@@ -738,16 +743,6 @@ export class Client extends ClientAbstract {
|
|
|
738
743
|
if (!this.apiHash) {
|
|
739
744
|
throw new Error("apiHash not set");
|
|
740
745
|
}
|
|
741
|
-
if (typeof params === "undefined") {
|
|
742
|
-
const loginType = mustPromptOneOf("Do you want to login as bot [b] or user [u]?", ["b", "u"]);
|
|
743
|
-
if (loginType == "b") {
|
|
744
|
-
params = mustPrompt("Bot token:");
|
|
745
|
-
}
|
|
746
|
-
else {
|
|
747
|
-
params = { phone: () => mustPrompt("Phone number:"), code: () => mustPrompt("Verification code:"), password: () => mustPrompt("Password:") };
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
dAuth("authorizing with %s", typeof params === "string" ? "bot token" : params instanceof types.auth.ExportedAuthorization ? "exported authorization" : "AuthorizeUserParams");
|
|
751
746
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initConnection).call(this);
|
|
752
747
|
try {
|
|
753
748
|
await __classPrivateFieldGet(this, _Client_updateManager, "f").fetchState("authorize");
|
|
@@ -761,6 +756,16 @@ export class Client extends ClientAbstract {
|
|
|
761
756
|
throw err;
|
|
762
757
|
}
|
|
763
758
|
}
|
|
759
|
+
if (typeof params === "undefined") {
|
|
760
|
+
const loginType = mustPromptOneOf("Do you want to login as bot [b] or user [u]?", ["b", "u"]);
|
|
761
|
+
if (loginType == "b") {
|
|
762
|
+
params = mustPrompt("Bot token:");
|
|
763
|
+
}
|
|
764
|
+
else {
|
|
765
|
+
params = { phone: () => mustPrompt("Phone number:"), code: () => mustPrompt("Verification code:"), password: () => mustPrompt("Password:") };
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
dAuth("authorizing with %s", typeof params === "string" ? "bot token" : params instanceof types.auth.ExportedAuthorization ? "exported authorization" : "AuthorizeUserParams");
|
|
764
769
|
if (typeof params === "string") {
|
|
765
770
|
while (true) {
|
|
766
771
|
try {
|
|
@@ -898,7 +903,6 @@ export class Client extends ClientAbstract {
|
|
|
898
903
|
*/
|
|
899
904
|
async start(params) {
|
|
900
905
|
await this.connect();
|
|
901
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initConnection).call(this);
|
|
902
906
|
await this.authorize(params);
|
|
903
907
|
}
|
|
904
908
|
/**
|
|
@@ -915,7 +919,6 @@ export class Client extends ClientAbstract {
|
|
|
915
919
|
}
|
|
916
920
|
else {
|
|
917
921
|
inputPeer.access_hash = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getUserAccessHash).call(this, inputPeer.user_id);
|
|
918
|
-
await this.storage.setUserAccessHash(inputPeer.user_id, inputPeer.access_hash);
|
|
919
922
|
}
|
|
920
923
|
}
|
|
921
924
|
return inputPeer;
|
|
@@ -1843,6 +1846,15 @@ export class Client extends ClientAbstract {
|
|
|
1843
1846
|
async setChatMemberRights(chatId, memberId, params) {
|
|
1844
1847
|
await __classPrivateFieldGet(this, _Client_messageManager, "f").setChatMemberRights(chatId, memberId, params);
|
|
1845
1848
|
}
|
|
1849
|
+
/**
|
|
1850
|
+
* Get the administrators of a chat.
|
|
1851
|
+
*
|
|
1852
|
+
* @method
|
|
1853
|
+
* @param chatId The identifier of the chat.
|
|
1854
|
+
*/
|
|
1855
|
+
async getChatAdministrators(chatId) {
|
|
1856
|
+
return await __classPrivateFieldGet(this, _Client_messageManager, "f").getChatAdministrators(chatId);
|
|
1857
|
+
}
|
|
1846
1858
|
}
|
|
1847
1859
|
_Client_handleCtxUpdate = async function _Client_handleCtxUpdate(update) {
|
|
1848
1860
|
await __classPrivateFieldGet(this, _Client_handle, "f").call(this, await __classPrivateFieldGet(this, _Client_constructContext, "f").call(this, update), resolve);
|