@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
|
@@ -7,7 +7,7 @@ export async function getObfuscationParameters(protocol, connection) {
|
|
|
7
7
|
if (init[0] == 0xEF) {
|
|
8
8
|
continue;
|
|
9
9
|
}
|
|
10
|
-
const dataView = new DataView(init.buffer);
|
|
10
|
+
const dataView = new DataView(init.buffer, init.byteOffset, init.byteLength);
|
|
11
11
|
const firstInt = dataView.getInt32(0);
|
|
12
12
|
if ([0x44414548, 0x54534F50, 0x20544547, 0x4954504F, 0x02010316, 0xDDDDDDDD, 0xEEEEEEEE].includes(firstInt)) {
|
|
13
13
|
continue;
|
|
@@ -27,6 +27,6 @@ export async function getObfuscationParameters(protocol, connection) {
|
|
|
27
27
|
const decryptKey = initRev.slice(8, 8 + 32);
|
|
28
28
|
const decryptIv = initRev.slice(40, 40 + 16);
|
|
29
29
|
const decryptionCTR = new CTR(decryptKey, decryptIv);
|
|
30
|
-
await connection.write(concat(init.
|
|
30
|
+
await connection.write(concat(init.subarray(0, 56), encryptedInit.subarray(56, 56 + 8)));
|
|
31
31
|
return { encryptionCTR, decryptionCTR };
|
|
32
32
|
}
|
|
@@ -49,7 +49,7 @@ export class TransportAbridged extends Transport {
|
|
|
49
49
|
const buffer = new Uint8Array(3);
|
|
50
50
|
await __classPrivateFieldGet(this, _TransportAbridged_connection, "f").read(buffer);
|
|
51
51
|
this.decrypt(buffer);
|
|
52
|
-
const dataView = new DataView(buffer.buffer);
|
|
52
|
+
const dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.byteLength);
|
|
53
53
|
length = dataView.getUint16(0, true);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
@@ -42,7 +42,7 @@ export class TransportIntermediate extends Transport {
|
|
|
42
42
|
const buffer = new Uint8Array(4);
|
|
43
43
|
await __classPrivateFieldGet(this, _TransportIntermediate_connection, "f").read(buffer);
|
|
44
44
|
this.decrypt(buffer);
|
|
45
|
-
const dataView = new DataView(buffer.buffer);
|
|
45
|
+
const dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.byteLength);
|
|
46
46
|
length = dataView.getUint32(0, true);
|
|
47
47
|
}
|
|
48
48
|
const buffer = new Uint8Array(length);
|
package/esm/types/0__file_id.js
CHANGED
|
@@ -86,11 +86,11 @@ export class FileID {
|
|
|
86
86
|
let buffer;
|
|
87
87
|
if (major < 4) {
|
|
88
88
|
minor = 0;
|
|
89
|
-
buffer = decoded.
|
|
89
|
+
buffer = decoded.subarray(0, -1);
|
|
90
90
|
}
|
|
91
91
|
else {
|
|
92
92
|
minor = decoded[decoded.length - 2];
|
|
93
|
-
buffer = decoded.
|
|
93
|
+
buffer = decoded.subarray(0, -2);
|
|
94
94
|
}
|
|
95
95
|
const reader = new TLReader(buffer);
|
|
96
96
|
let fileType = reader.readInt32();
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { types } from "../2_tl.js";
|
|
1
2
|
/** The rights of a chat member. */
|
|
2
3
|
export interface ChatMemberRights {
|
|
3
4
|
/** Whether messages are allowed to be sent. */
|
|
@@ -35,3 +36,5 @@ export interface ChatMemberRights {
|
|
|
35
36
|
/** Whether it is allowed to manage topics. */
|
|
36
37
|
canManageTopics?: boolean;
|
|
37
38
|
}
|
|
39
|
+
export declare function constructChatMemberRights(rights: types.ChatBannedRights): ChatMemberRights;
|
|
40
|
+
export declare function chatMemberRightsToTlObject(rights?: ChatMemberRights, untilDate?: Date): import("../tl/2_types.js").ChatBannedRights_;
|
|
@@ -1 +1,45 @@
|
|
|
1
|
-
|
|
1
|
+
import { toUnixTimestamp } from "../1_utilities.js";
|
|
2
|
+
import { types } from "../2_tl.js";
|
|
3
|
+
export function constructChatMemberRights(rights) {
|
|
4
|
+
return {
|
|
5
|
+
canSendMessages: rights.send_messages ? true : false,
|
|
6
|
+
canSendAudio: rights.send_audios ? true : false,
|
|
7
|
+
canSendDocuments: rights.send_docs ? true : false,
|
|
8
|
+
canSendPhotos: rights.send_photos ? true : false,
|
|
9
|
+
canSendVideos: rights.send_messages ? true : false,
|
|
10
|
+
canSendVideoNotes: rights.send_roundvideos ? true : false,
|
|
11
|
+
canSendVoice: rights.send_voices ? true : false,
|
|
12
|
+
canSendPolls: rights.send_polls ? true : false,
|
|
13
|
+
canSendStickers: rights.send_stickers ? true : false,
|
|
14
|
+
canSendAnimations: rights.send_gifs ? true : undefined,
|
|
15
|
+
canSendGames: rights.send_games ? true : undefined,
|
|
16
|
+
canSendInlineBotResults: rights.send_inline ? true : undefined,
|
|
17
|
+
canAddWebPagePreviews: rights.embed_links ? true : undefined,
|
|
18
|
+
canChangeInfo: rights.change_info ? true : undefined,
|
|
19
|
+
canInviteUsers: rights.invite_users ? true : undefined,
|
|
20
|
+
canPinMessages: rights.pin_messages ? true : undefined,
|
|
21
|
+
canManageTopics: rights.manage_topics ? true : undefined,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export function chatMemberRightsToTlObject(rights, untilDate) {
|
|
25
|
+
return new types.ChatBannedRights({
|
|
26
|
+
until_date: untilDate ? toUnixTimestamp(untilDate) : 0,
|
|
27
|
+
send_messages: rights?.canSendMessages ? true : undefined,
|
|
28
|
+
send_audios: rights?.canSendAudio ? true : undefined,
|
|
29
|
+
send_docs: rights?.canSendDocuments ? true : undefined,
|
|
30
|
+
send_photos: rights?.canSendPhotos ? true : undefined,
|
|
31
|
+
send_videos: rights?.canSendVideos ? true : undefined,
|
|
32
|
+
send_roundvideos: rights?.canSendVideoNotes ? true : undefined,
|
|
33
|
+
send_voices: rights?.canSendVoice ? true : undefined,
|
|
34
|
+
send_polls: rights?.canSendPolls ? true : undefined,
|
|
35
|
+
send_stickers: rights?.canSendStickers ? true : undefined,
|
|
36
|
+
send_gifs: rights?.canSendAnimations ? true : undefined,
|
|
37
|
+
send_games: rights?.canSendGames ? true : undefined,
|
|
38
|
+
send_inline: rights?.canSendInlineBotResults ? true : undefined,
|
|
39
|
+
embed_links: rights?.canAddWebPagePreviews ? true : undefined,
|
|
40
|
+
change_info: rights?.canChangeInfo ? true : undefined,
|
|
41
|
+
invite_users: rights?.canInviteUsers ? true : undefined,
|
|
42
|
+
pin_messages: rights?.canPinMessages ? true : undefined,
|
|
43
|
+
manage_topics: rights?.canManageTopics ? true : undefined,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { enums } from "../2_tl.js";
|
|
2
|
+
import { EntityGetter } from "./1__getters.js";
|
|
2
3
|
/** @unlisted */
|
|
3
4
|
export type MessageEntityType = "mention" | "hashtag" | "botCommand" | "url" | "email" | "bold" | "italic" | "code" | "pre" | "textLink" | "textMention" | "cashtag" | "phoneNumber" | "underline" | "strikethrough" | "blockquote" | "bankCard" | "spoiler" | "customEmoji";
|
|
4
5
|
/** @unlisted */
|
|
@@ -94,4 +95,4 @@ export interface MessageEntityCustomEmoji extends _MessageEntityBase {
|
|
|
94
95
|
/** A single entity of a message's text or caption. */
|
|
95
96
|
export type MessageEntity = MessageEntityMention | MessageEntityHashtag | MessageEntityBotCommand | MessageEntityURL | MessageEntityEmailAddress | MessageEntityBold | MessageEntityItalic | MessageEntityCode | MessageEntityPre | MessageEntityTextLink | MessageEntityTextMention | MessageEntityCashtag | MessageEntityPhoneNumber | MessageEntityUnderline | MessageEntityStrikethrough | MessageEntityBlockquote | MessageEntityBankCard | MessageEntitySpoiler | MessageEntityCustomEmoji;
|
|
96
97
|
export declare function constructMessageEntity(obj: enums.MessageEntity): MessageEntity | null;
|
|
97
|
-
export declare function messageEntityToTlObject(entity: MessageEntity): 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").
|
|
98
|
+
export declare function messageEntityToTlObject(entity: MessageEntity, getEntity: EntityGetter): Promise<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_>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { UNREACHABLE } from "../1_utilities.js";
|
|
1
2
|
import { types } from "../2_tl.js";
|
|
2
3
|
export function constructMessageEntity(obj) {
|
|
3
4
|
if (obj instanceof types.MessageEntityMention) {
|
|
@@ -61,7 +62,7 @@ export function constructMessageEntity(obj) {
|
|
|
61
62
|
return null;
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
|
-
export function messageEntityToTlObject(entity) {
|
|
65
|
+
export async function messageEntityToTlObject(entity, getEntity) {
|
|
65
66
|
const { offset, length } = entity;
|
|
66
67
|
switch (entity.type) {
|
|
67
68
|
case "mention":
|
|
@@ -82,10 +83,32 @@ export function messageEntityToTlObject(entity) {
|
|
|
82
83
|
return new types.MessageEntityCode({ offset, length });
|
|
83
84
|
case "pre":
|
|
84
85
|
return new types.MessageEntityPre({ offset, length, language: entity.language });
|
|
85
|
-
case "textLink":
|
|
86
|
+
case "textLink": {
|
|
87
|
+
try {
|
|
88
|
+
const url = new URL(entity.url);
|
|
89
|
+
if (url.protocol == "tg:" && url.hostname == "user" && (url.pathname == "/" || url.pathname == "")) {
|
|
90
|
+
const id = Number(url.searchParams.get("id"));
|
|
91
|
+
if (!isNaN(id)) {
|
|
92
|
+
const entity_ = await getEntity(new types.PeerUser({ user_id: BigInt(id) }));
|
|
93
|
+
if (!entity_) {
|
|
94
|
+
UNREACHABLE();
|
|
95
|
+
}
|
|
96
|
+
return new types.InputMessageEntityMentionName({ offset, length, user_id: new types.InputUser({ user_id: entity_.id, access_hash: entity_.access_hash ?? 0n }) });
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
catch {
|
|
101
|
+
//
|
|
102
|
+
}
|
|
86
103
|
return new types.MessageEntityTextUrl({ offset, length, url: entity.url });
|
|
87
|
-
|
|
88
|
-
|
|
104
|
+
}
|
|
105
|
+
case "textMention": {
|
|
106
|
+
const entity_ = await getEntity(new types.PeerUser({ user_id: BigInt(entity.userId) }));
|
|
107
|
+
if (!entity_) {
|
|
108
|
+
UNREACHABLE();
|
|
109
|
+
}
|
|
110
|
+
return new types.InputMessageEntityMentionName({ offset, length, user_id: new types.InputUser({ user_id: entity_.id, access_hash: entity_.access_hash ?? 0n }) });
|
|
111
|
+
}
|
|
89
112
|
case "cashtag":
|
|
90
113
|
return new types.MessageEntityCashtag({ offset, length });
|
|
91
114
|
case "phoneNumber":
|
package/esm/types/1_chat_p.js
CHANGED
|
@@ -36,7 +36,7 @@ export function constructChatP(chat) {
|
|
|
36
36
|
}
|
|
37
37
|
return cleanObject(chat_);
|
|
38
38
|
}
|
|
39
|
-
else if (chat instanceof types.Channel || types.ChannelForbidden) {
|
|
39
|
+
else if (chat instanceof types.Channel || chat instanceof types.ChannelForbidden) {
|
|
40
40
|
let chat_;
|
|
41
41
|
const id = ZERO_CHANNEL_ID + -Number(chat.id);
|
|
42
42
|
if (chat instanceof types.ChannelForbidden) {
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { enums } from "../2_tl.js";
|
|
2
|
+
import { ChatAdministratorRights } from "./0_chat_administrator_rights.js";
|
|
3
|
+
import { ChatMemberRights } from "./0_chat_member_rights.js";
|
|
4
|
+
import { EntityGetter } from "./1__getters.js";
|
|
5
|
+
import { User } from "./1_user.js";
|
|
6
|
+
/** @unlisted */
|
|
7
|
+
export type ChatMemberStatus = "creator" | "administrator" | "member" | "restricted" | "left" | "banned";
|
|
8
|
+
/** @unlisted */
|
|
9
|
+
export interface ChatMemberBase {
|
|
10
|
+
status: ChatMemberStatus;
|
|
11
|
+
user: User;
|
|
12
|
+
}
|
|
13
|
+
/** @unlisted */
|
|
14
|
+
export interface ChatMemberCreator extends ChatMemberBase {
|
|
15
|
+
status: "creator";
|
|
16
|
+
isAnonymous: boolean;
|
|
17
|
+
title?: string;
|
|
18
|
+
}
|
|
19
|
+
/** @unlisted */
|
|
20
|
+
export interface ChatMemberAdministrator extends ChatMemberBase {
|
|
21
|
+
status: "administrator";
|
|
22
|
+
rights: ChatAdministratorRights;
|
|
23
|
+
title?: string;
|
|
24
|
+
}
|
|
25
|
+
/** @unlisted */
|
|
26
|
+
export interface ChatMemberMember extends ChatMemberBase {
|
|
27
|
+
status: "member";
|
|
28
|
+
}
|
|
29
|
+
/** @unlisted */
|
|
30
|
+
export interface ChatMemberRestricted extends ChatMemberBase {
|
|
31
|
+
status: "restricted";
|
|
32
|
+
isMember: boolean;
|
|
33
|
+
rights: ChatMemberRights;
|
|
34
|
+
untilDate?: Date;
|
|
35
|
+
}
|
|
36
|
+
/** @unlisted */
|
|
37
|
+
export interface ChatMemberLeft extends ChatMemberBase {
|
|
38
|
+
status: "left";
|
|
39
|
+
}
|
|
40
|
+
/** @unlisted */
|
|
41
|
+
export interface ChatMemberBanned extends ChatMemberBase {
|
|
42
|
+
status: "banned";
|
|
43
|
+
untilDate?: Date;
|
|
44
|
+
}
|
|
45
|
+
export type ChatMember = ChatMemberCreator | ChatMemberAdministrator | ChatMemberMember | ChatMemberRestricted | ChatMemberLeft | ChatMemberBanned;
|
|
46
|
+
export declare function constructChatMember(participant: enums.ChannelParticipant | enums.ChatParticipant, getEntity: EntityGetter): Promise<ChatMember>;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { cleanObject, fromUnixTimestamp, UNREACHABLE } from "../1_utilities.js";
|
|
2
|
+
import { types } from "../2_tl.js";
|
|
3
|
+
import { constructChatAdministratorRights } from "./0_chat_administrator_rights.js";
|
|
4
|
+
import { constructChatMemberRights } from "./0_chat_member_rights.js";
|
|
5
|
+
import { constructUser } from "./1_user.js";
|
|
6
|
+
export async function constructChatMember(participant, getEntity) {
|
|
7
|
+
const user_ = "user_id" in participant ? await getEntity(new types.PeerUser(participant)) : "peer" in participant ? participant.peer instanceof types.PeerUser ? await getEntity(participant.peer) : UNREACHABLE() : UNREACHABLE(); // TODO: support other peer types
|
|
8
|
+
if (user_ == null)
|
|
9
|
+
UNREACHABLE();
|
|
10
|
+
const user = constructUser(user_);
|
|
11
|
+
if (participant instanceof types.ChannelParticipant || participant instanceof types.ChatParticipant) {
|
|
12
|
+
return {
|
|
13
|
+
status: "member",
|
|
14
|
+
user,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
else if (participant instanceof types.ChannelParticipantCreator) {
|
|
18
|
+
return cleanObject({
|
|
19
|
+
status: "creator",
|
|
20
|
+
user,
|
|
21
|
+
isAnonymous: participant.admin_rights.anonymous ? true : false,
|
|
22
|
+
title: participant.rank,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
else if (participant instanceof types.ChannelParticipantAdmin) {
|
|
26
|
+
return cleanObject({
|
|
27
|
+
status: "administrator",
|
|
28
|
+
user,
|
|
29
|
+
rights: constructChatAdministratorRights(participant.admin_rights),
|
|
30
|
+
title: participant.rank,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
else if (participant instanceof types.ChannelParticipantBanned) {
|
|
34
|
+
const untilDate = participant.banned_rights.until_date ? fromUnixTimestamp(participant.banned_rights.until_date) : undefined;
|
|
35
|
+
if (!participant.banned_rights.view_messages) {
|
|
36
|
+
participant.peer;
|
|
37
|
+
return cleanObject({
|
|
38
|
+
status: "banned",
|
|
39
|
+
user,
|
|
40
|
+
untilDate,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
const isMember = participant.left ? true : false;
|
|
44
|
+
const rights = constructChatMemberRights(participant.banned_rights);
|
|
45
|
+
return cleanObject({
|
|
46
|
+
status: "restricted",
|
|
47
|
+
user,
|
|
48
|
+
isMember,
|
|
49
|
+
rights,
|
|
50
|
+
untilDate,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
else if (participant instanceof types.ChannelParticipantSelf) {
|
|
54
|
+
UNREACHABLE(); // TODO: implement
|
|
55
|
+
}
|
|
56
|
+
else if (participant instanceof types.ChannelParticipantLeft) {
|
|
57
|
+
return { status: "left", user };
|
|
58
|
+
}
|
|
59
|
+
else if (participant instanceof types.ChatParticipantAdmin) {
|
|
60
|
+
return cleanObject({
|
|
61
|
+
status: "administrator",
|
|
62
|
+
user,
|
|
63
|
+
rights: {
|
|
64
|
+
isAnonymous: false,
|
|
65
|
+
canManageChat: true,
|
|
66
|
+
canDeleteMessages: true,
|
|
67
|
+
canManageVideoChats: false,
|
|
68
|
+
canRestrictMembers: true,
|
|
69
|
+
canPromoteMembers: false,
|
|
70
|
+
canChangeInfo: true,
|
|
71
|
+
canInviteUsers: true,
|
|
72
|
+
canPostMessages: false,
|
|
73
|
+
canEditMessages: false,
|
|
74
|
+
canPinMessages: true,
|
|
75
|
+
canManageTopics: false,
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
else if (participant instanceof types.ChatParticipantCreator) {
|
|
80
|
+
return cleanObject({
|
|
81
|
+
status: "creator",
|
|
82
|
+
user,
|
|
83
|
+
isAnonymous: false,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
UNREACHABLE();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -189,5 +189,5 @@ export type InlineQueryResult = InlineQueryResultCachedAudio | InlineQueryResult
|
|
|
189
189
|
export declare function inlineQueryResultToTlObject(result_: InlineQueryResult, parseText: (text: string, params?: {
|
|
190
190
|
parseMode?: ParseMode;
|
|
191
191
|
entities?: MessageEntity[];
|
|
192
|
-
}) => readonly [string, any[] | undefined]
|
|
192
|
+
}) => Promise<readonly [string, any[] | undefined]>, usernameResolver: UsernameResolver): Promise<import("../tl/2_types.js").InputBotInlineResult_ | import("../tl/2_types.js").InputBotInlineResultDocument_>;
|
|
193
193
|
export {};
|
|
@@ -148,7 +148,7 @@ export async function inlineQueryResultToTlObject(result_, parseText, usernameRe
|
|
|
148
148
|
}
|
|
149
149
|
let ret = ["", []];
|
|
150
150
|
if ("caption" in result_ && result_.caption) {
|
|
151
|
-
ret = parseText(result_.caption, { parseMode: result_.parseMode, entities: result_.captionEntities });
|
|
151
|
+
ret = await parseText(result_.caption, { parseMode: result_.parseMode, entities: result_.captionEntities });
|
|
152
152
|
}
|
|
153
153
|
const { type, id } = result_;
|
|
154
154
|
const [message, entities] = ret;
|
|
@@ -223,7 +223,7 @@ export async function inlineQueryResultToTlObject(result_, parseText, usernameRe
|
|
|
223
223
|
if (!("messageText" in result_.inputMessageContent)) {
|
|
224
224
|
UNREACHABLE();
|
|
225
225
|
}
|
|
226
|
-
const [message, entities] = parseText(result_.inputMessageContent.messageText, { entities: result_.inputMessageContent.entities, parseMode: result_.inputMessageContent.parseMode });
|
|
226
|
+
const [message, entities] = await parseText(result_.inputMessageContent.messageText, { entities: result_.inputMessageContent.entities, parseMode: result_.inputMessageContent.parseMode });
|
|
227
227
|
return new types.InputBotInlineResult({
|
|
228
228
|
id,
|
|
229
229
|
type,
|
package/package.json
CHANGED
package/script/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/script/0_deps.js
CHANGED
|
@@ -27,14 +27,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.debug = exports.Parser = exports.Mutex = exports.gzip = exports.gunzip = exports.initTgCrypto = exports.ige256Encrypt = exports.ige256Decrypt = exports.factorize = exports.ctr256 = exports.extension = exports.contentType = exports.encodeBase64 = exports.decodeBase64 = exports.path = void 0;
|
|
30
|
-
__exportStar(require("./deps/deno.land/std@0.
|
|
31
|
-
exports.path = __importStar(require("./deps/deno.land/std@0.
|
|
32
|
-
var base64_js_1 = require("./deps/deno.land/std@0.
|
|
30
|
+
__exportStar(require("./deps/deno.land/std@0.212.0/assert/mod.js"), exports);
|
|
31
|
+
exports.path = __importStar(require("./deps/deno.land/std@0.212.0/path/mod.js"));
|
|
32
|
+
var base64_js_1 = require("./deps/deno.land/std@0.212.0/encoding/base64.js");
|
|
33
33
|
Object.defineProperty(exports, "decodeBase64", { enumerable: true, get: function () { return base64_js_1.decodeBase64; } });
|
|
34
34
|
Object.defineProperty(exports, "encodeBase64", { enumerable: true, get: function () { return base64_js_1.encodeBase64; } });
|
|
35
|
-
var content_type_js_1 = require("./deps/deno.land/std@0.
|
|
35
|
+
var content_type_js_1 = require("./deps/deno.land/std@0.212.0/media_types/content_type.js");
|
|
36
36
|
Object.defineProperty(exports, "contentType", { enumerable: true, get: function () { return content_type_js_1.contentType; } });
|
|
37
|
-
const extension_js_1 = require("./deps/deno.land/std@0.
|
|
37
|
+
const extension_js_1 = require("./deps/deno.land/std@0.212.0/media_types/extension.js");
|
|
38
38
|
function extension(mimeType) {
|
|
39
39
|
if (mimeType == "application/x-tgsticker") {
|
|
40
40
|
return "tgs";
|
package/script/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/script/3_types.js
CHANGED
|
@@ -63,6 +63,7 @@ __exportStar(require("./types/1_sticker.js"), exports);
|
|
|
63
63
|
__exportStar(require("./types/1_user.js"), exports);
|
|
64
64
|
__exportStar(require("./types/1_video_note.js"), exports);
|
|
65
65
|
__exportStar(require("./types/1_video.js"), exports);
|
|
66
|
+
__exportStar(require("./types/2_chat_member.js"), exports);
|
|
66
67
|
__exportStar(require("./types/2_chosen_inline_result.js"), exports);
|
|
67
68
|
__exportStar(require("./types/2_game.js"), exports);
|
|
68
69
|
__exportStar(require("./types/2_inline_keyboard_button.js"), exports);
|
package/script/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/script/4_constants.js
CHANGED
|
@@ -78,8 +78,8 @@ exports.PUBLIC_KEYS = Object.freeze([
|
|
|
78
78
|
],
|
|
79
79
|
]);
|
|
80
80
|
exports.INITIAL_DC = "2";
|
|
81
|
-
exports.LAYER =
|
|
82
|
-
exports.APP_VERSION = "MTKruto 0.1.
|
|
81
|
+
exports.LAYER = 172;
|
|
82
|
+
exports.APP_VERSION = "MTKruto 0.1.145";
|
|
83
83
|
// @ts-ignore: lib
|
|
84
84
|
exports.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;
|
|
85
85
|
exports.LANG_CODE = typeof navigator === "undefined" ? "en" : navigator.language.split("-")[0];
|
|
@@ -45,11 +45,11 @@ async function encryptMessage(message, authKey, authKeyId, salt, sessionId) {
|
|
|
45
45
|
payloadWriter.write(encoded);
|
|
46
46
|
payloadWriter.write(new Uint8Array((0, _1_utilities_js_1.mod)(-(payloadWriter.buffer.length + 12), 16) + 12));
|
|
47
47
|
const payload = payloadWriter.buffer;
|
|
48
|
-
const messageKey = (await (0, _1_utilities_js_1.sha256)((0, _1_utilities_js_1.concat)(authKey.
|
|
49
|
-
const a = await (0, _1_utilities_js_1.sha256)((0, _1_utilities_js_1.concat)(messageKey, authKey.
|
|
50
|
-
const b = await (0, _1_utilities_js_1.sha256)((0, _1_utilities_js_1.concat)(authKey.
|
|
51
|
-
const aesKey = (0, _1_utilities_js_1.concat)(a.
|
|
52
|
-
const aesIV = (0, _1_utilities_js_1.concat)(b.
|
|
48
|
+
const messageKey = (await (0, _1_utilities_js_1.sha256)((0, _1_utilities_js_1.concat)(authKey.subarray(88, 120), payload))).subarray(8, 24);
|
|
49
|
+
const a = await (0, _1_utilities_js_1.sha256)((0, _1_utilities_js_1.concat)(messageKey, authKey.subarray(0, 36)));
|
|
50
|
+
const b = await (0, _1_utilities_js_1.sha256)((0, _1_utilities_js_1.concat)(authKey.subarray(40, 76), messageKey));
|
|
51
|
+
const aesKey = (0, _1_utilities_js_1.concat)(a.subarray(0, 8), b.subarray(8, 24), a.subarray(24, 32));
|
|
52
|
+
const aesIV = (0, _1_utilities_js_1.concat)(b.subarray(0, 8), a.subarray(8, 24), b.subarray(24, 32));
|
|
53
53
|
const messageWriter = new _2_tl_js_1.TLWriter();
|
|
54
54
|
messageWriter.writeInt64(authKeyId);
|
|
55
55
|
messageWriter.write(messageKey);
|
|
@@ -62,10 +62,10 @@ async function decryptMessage(buffer, authKey, authKeyId, _sessionId) {
|
|
|
62
62
|
(0, _0_deps_js_1.assertEquals)(reader.readInt64(false), authKeyId);
|
|
63
63
|
const messageKey_ = reader.readInt128();
|
|
64
64
|
const messageKey = (0, _1_utilities_js_1.bufferFromBigInt)(messageKey_, 16, true, true);
|
|
65
|
-
const a = await (0, _1_utilities_js_1.sha256)((0, _1_utilities_js_1.concat)(messageKey, authKey.
|
|
66
|
-
const b = await (0, _1_utilities_js_1.sha256)((0, _1_utilities_js_1.concat)(authKey.
|
|
67
|
-
const aesKey = (0, _1_utilities_js_1.concat)(a.
|
|
68
|
-
const aesIv = (0, _1_utilities_js_1.concat)(b.
|
|
65
|
+
const a = await (0, _1_utilities_js_1.sha256)((0, _1_utilities_js_1.concat)(messageKey, authKey.subarray(8, 44)));
|
|
66
|
+
const b = await (0, _1_utilities_js_1.sha256)((0, _1_utilities_js_1.concat)(authKey.subarray(48, 84), messageKey));
|
|
67
|
+
const aesKey = (0, _1_utilities_js_1.concat)(a.subarray(0, 8), b.subarray(8, 24), a.subarray(24, 32));
|
|
68
|
+
const aesIv = (0, _1_utilities_js_1.concat)(b.subarray(0, 8), a.subarray(8, 24), b.subarray(24, 32));
|
|
69
69
|
const plaintext = (0, _0_deps_js_1.ige256Decrypt)(reader.buffer, aesKey, aesIv);
|
|
70
70
|
(0, _0_deps_js_1.assertEquals)(plaintext.buffer.byteLength % 4, 0);
|
|
71
71
|
let plainReader = new _2_tl_js_1.TLReader(plaintext);
|
|
@@ -10,7 +10,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
11
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
12
|
};
|
|
13
|
-
var _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;
|
|
13
|
+
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;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.UpdateManager = void 0;
|
|
16
16
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
@@ -27,7 +27,9 @@ class UpdateManager {
|
|
|
27
27
|
_UpdateManager_c.set(this, void 0);
|
|
28
28
|
_UpdateManager_updateState.set(this, void 0);
|
|
29
29
|
_UpdateManager_updateHandler.set(this, void 0);
|
|
30
|
+
_UpdateManager_defaultDropPendingUpdates.set(this, null);
|
|
30
31
|
_UpdateManager_handleUpdateQueues.set(this, new Map());
|
|
32
|
+
_UpdateManager_nonFirst.set(this, new Set());
|
|
31
33
|
_UpdateManager_channelUpdateQueues.set(this, new Map());
|
|
32
34
|
_UpdateManager_ptsUpdateQueue.set(this, new _1_utilities_js_1.Queue("ptsUpdate"));
|
|
33
35
|
_UpdateManager_processUpdatesQueue.set(this, new _1_utilities_js_1.Queue("UpdateManager/processUpdates"));
|
|
@@ -38,25 +40,24 @@ class UpdateManager {
|
|
|
38
40
|
const state = await __classPrivateFieldGet(this, _UpdateManager_c, "f").api.updates.getState();
|
|
39
41
|
__classPrivateFieldSet(this, _UpdateManager_updateState, state, "f");
|
|
40
42
|
d("state fetched [%s]", source);
|
|
43
|
+
if (await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_mustDropPendingUpdates).call(this)) {
|
|
44
|
+
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.setState(state);
|
|
45
|
+
}
|
|
41
46
|
}
|
|
42
47
|
async processChats(chats) {
|
|
43
48
|
for (const chat of chats) {
|
|
44
|
-
if (chat instanceof _2_tl_js_1.types.Channel
|
|
49
|
+
if (chat instanceof _2_tl_js_1.types.Channel || chat instanceof _2_tl_js_1.types.ChannelForbidden) {
|
|
45
50
|
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.setEntity(chat);
|
|
46
|
-
|
|
47
|
-
if (chat.username) {
|
|
51
|
+
if ("username" in chat && chat.username) {
|
|
48
52
|
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.updateUsernames("channel", chat.id, [chat.username]);
|
|
49
53
|
}
|
|
50
|
-
if (chat.usernames) {
|
|
54
|
+
if ("usernames" in chat && chat.usernames) {
|
|
51
55
|
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.updateUsernames("channel", chat.id, chat.usernames.map((v) => v.username));
|
|
52
56
|
}
|
|
53
57
|
}
|
|
54
|
-
else if (chat instanceof _2_tl_js_1.types.Chat) {
|
|
58
|
+
else if (chat instanceof _2_tl_js_1.types.Chat || chat instanceof _2_tl_js_1.types.ChatForbidden) {
|
|
55
59
|
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.setEntity(chat);
|
|
56
60
|
}
|
|
57
|
-
else if (chat instanceof _2_tl_js_1.types.ChannelForbidden || chat instanceof _2_tl_js_1.types.ChatForbidden) {
|
|
58
|
-
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.removeEntity(chat);
|
|
59
|
-
}
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
63
|
async processResult(result) {
|
|
@@ -120,7 +121,6 @@ class UpdateManager {
|
|
|
120
121
|
for (const user of users) {
|
|
121
122
|
if (user instanceof _2_tl_js_1.types.User && user.access_hash) {
|
|
122
123
|
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.setEntity(user);
|
|
123
|
-
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.setUserAccessHash(user.id, user.access_hash);
|
|
124
124
|
if (user.username) {
|
|
125
125
|
await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.updateUsernames("user", user.id, [user.username]);
|
|
126
126
|
}
|
|
@@ -197,13 +197,33 @@ class UpdateManager {
|
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
exports.UpdateManager = UpdateManager;
|
|
200
|
-
_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(),
|
|
200
|
+
_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() {
|
|
201
|
+
if (typeof __classPrivateFieldGet(this, _UpdateManager_c, "f").dropPendingUpdates === "boolean") {
|
|
202
|
+
return __classPrivateFieldGet(this, _UpdateManager_c, "f").dropPendingUpdates;
|
|
203
|
+
}
|
|
204
|
+
if (__classPrivateFieldGet(this, _UpdateManager_defaultDropPendingUpdates, "f") == null) {
|
|
205
|
+
__classPrivateFieldSet(this, _UpdateManager_defaultDropPendingUpdates, await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.getAccountType() == "bot", "f");
|
|
206
|
+
}
|
|
207
|
+
return __classPrivateFieldGet(this, _UpdateManager_defaultDropPendingUpdates, "f");
|
|
208
|
+
}, _UpdateManager_getChannelPtsWithDropPendingUpdatesCheck = async function _UpdateManager_getChannelPtsWithDropPendingUpdatesCheck(channelId) {
|
|
209
|
+
if (!(await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_mustDropPendingUpdates).call(this))) {
|
|
210
|
+
return await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.getChannelPts(channelId);
|
|
211
|
+
}
|
|
212
|
+
const first = !__classPrivateFieldGet(this, _UpdateManager_nonFirst, "f").has(channelId);
|
|
213
|
+
if (first) {
|
|
214
|
+
__classPrivateFieldGet(this, _UpdateManager_nonFirst, "f").add(channelId);
|
|
215
|
+
return null;
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
return await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.getChannelPts(channelId);
|
|
219
|
+
}
|
|
220
|
+
}, _UpdateManager_checkGap = async function _UpdateManager_checkGap(pts, ptsCount) {
|
|
201
221
|
const localState = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_getLocalState).call(this);
|
|
202
222
|
if (localState.pts + ptsCount < pts) {
|
|
203
223
|
await this.recoverUpdateGap("processUpdates");
|
|
204
224
|
}
|
|
205
225
|
}, _UpdateManager_checkChannelGap = async function _UpdateManager_checkChannelGap(channelId, pts, ptsCount) {
|
|
206
|
-
let localPts = await __classPrivateFieldGet(this,
|
|
226
|
+
let localPts = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_getChannelPtsWithDropPendingUpdatesCheck).call(this, channelId);
|
|
207
227
|
if (!localPts) {
|
|
208
228
|
localPts = pts - ptsCount;
|
|
209
229
|
}
|
|
@@ -224,7 +244,7 @@ _a = UpdateManager, _UpdateManager_c = new WeakMap(), _UpdateManager_updateState
|
|
|
224
244
|
if (checkGap) {
|
|
225
245
|
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_checkChannelGap).call(this, channelId, update.pts, ptsCount);
|
|
226
246
|
}
|
|
227
|
-
let currentPts = await __classPrivateFieldGet(this,
|
|
247
|
+
let currentPts = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_getChannelPtsWithDropPendingUpdatesCheck).call(this, channelId);
|
|
228
248
|
currentPts ??= update.pts - ptsCount;
|
|
229
249
|
if (currentPts + ptsCount > update.pts) {
|
|
230
250
|
return;
|
|
@@ -109,8 +109,8 @@ class ClientPlain extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
109
109
|
d("got server_DH_params_ok");
|
|
110
110
|
const newNonce_ = (0, _1_utilities_js_1.bufferFromBigInt)(newNonce, 32, true, true);
|
|
111
111
|
const serverNonce_ = (0, _1_utilities_js_1.bufferFromBigInt)(serverNonce, 16, true, true);
|
|
112
|
-
const tmpAesKey = (0, _1_utilities_js_1.concat)(await (0, _1_utilities_js_1.sha1)((0, _1_utilities_js_1.concat)(newNonce_, serverNonce_)), (await (0, _1_utilities_js_1.sha1)((0, _1_utilities_js_1.concat)(serverNonce_, newNonce_))).
|
|
113
|
-
const tmpAesIv = (0, _1_utilities_js_1.concat)((await (0, _1_utilities_js_1.sha1)((0, _1_utilities_js_1.concat)(serverNonce_, newNonce_))).
|
|
112
|
+
const tmpAesKey = (0, _1_utilities_js_1.concat)(await (0, _1_utilities_js_1.sha1)((0, _1_utilities_js_1.concat)(newNonce_, serverNonce_)), (await (0, _1_utilities_js_1.sha1)((0, _1_utilities_js_1.concat)(serverNonce_, newNonce_))).subarray(0, 0 + 12));
|
|
113
|
+
const tmpAesIv = (0, _1_utilities_js_1.concat)((await (0, _1_utilities_js_1.sha1)((0, _1_utilities_js_1.concat)(serverNonce_, newNonce_))).subarray(12, 12 + 8), await (0, _1_utilities_js_1.sha1)((0, _1_utilities_js_1.concat)(newNonce_, newNonce_)), newNonce_.subarray(0, 0 + 4));
|
|
114
114
|
const answerWithHash = (0, _0_deps_js_1.ige256Decrypt)(dhParams.encrypted_answer, tmpAesKey, tmpAesIv);
|
|
115
115
|
const dhInnerData = new _2_tl_js_1.TLReader(answerWithHash.slice(20)).readObject();
|
|
116
116
|
(0, _0_deps_js_1.assertInstanceOf)(dhInnerData, _2_tl_js_1.types.Server_DH_inner_data);
|
|
@@ -133,8 +133,8 @@ class ClientPlain extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
133
133
|
const dhGenOk = await this.invoke(new _2_tl_js_1.functions.set_client_DH_params({ nonce, server_nonce: serverNonce, encrypted_data: encryptedData }));
|
|
134
134
|
(0, _0_deps_js_1.assertInstanceOf)(dhGenOk, _2_tl_js_1.types.Dh_gen_ok);
|
|
135
135
|
d("got dh_gen_ok");
|
|
136
|
-
const serverNonceSlice = serverNonce_.
|
|
137
|
-
const salt = newNonce_.
|
|
136
|
+
const serverNonceSlice = serverNonce_.subarray(0, 8);
|
|
137
|
+
const salt = newNonce_.subarray(0, 0 + 8).map((v, i) => v ^ serverNonceSlice[i]);
|
|
138
138
|
const authKey_ = (0, _1_utilities_js_1.modExp)(gA, b, dhPrime);
|
|
139
139
|
const authKey = (0, _1_utilities_js_1.bufferFromBigInt)(authKey_, 256, false, false);
|
|
140
140
|
d("auth key created");
|