@mtkruto/node 0.1.124 → 0.1.126
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 -3
- package/esm/0_deps.js +4 -3
- package/esm/1_utilities.d.ts +1 -1
- package/esm/1_utilities.js +1 -1
- package/esm/3_types.d.ts +2 -1
- package/esm/3_types.js +2 -1
- package/esm/4_constants.d.ts +1 -1
- package/esm/4_constants.js +1 -1
- package/esm/client/1_client_abstract.d.ts +1 -1
- package/esm/client/3_types.d.ts +79 -2
- package/esm/client/3_types.js +11 -1
- package/esm/client/5_client.d.ts +31 -2
- package/esm/client/5_client.js +473 -67
- package/esm/connection/0_connection.d.ts +4 -0
- package/esm/connection/0_connection.js +6 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_diff.d.ts +6 -5
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_diff.js +5 -6
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_format.js +2 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert.d.ts +12 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert.js +18 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert_almost_equals.d.ts +17 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_almost_equals.js +9 -10
- package/esm/deps/deno.land/std@0.209.0/assert/assert_array_includes.d.ts +18 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_array_includes.js +6 -4
- package/{script/deps/deno.land/std@0.208.0 → esm/deps/deno.land/std@0.209.0}/assert/assert_equals.d.ts +4 -5
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_equals.js +4 -5
- package/esm/deps/deno.land/std@0.209.0/assert/assert_exists.d.ts +13 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_exists.js +8 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert_false.d.ts +14 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert_false.js +18 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert_greater.d.ts +14 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_greater.js +9 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert_greater_or_equal.d.ts +14 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_greater_or_equal.js +9 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert_instance_of.d.ts +17 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_instance_of.js +8 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert_is_error.d.ts +18 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert_is_error.js +48 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert_less.d.ts +13 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_less.js +8 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert_less_or_equal.d.ts +14 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_less_or_equal.js +9 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert_match.d.ts +13 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_match.js +8 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_equals.d.ts +2 -1
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_equals.js +2 -1
- package/esm/deps/deno.land/std@0.209.0/assert/assert_not_instance_of.d.ts +13 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_instance_of.js +8 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assert_not_match.d.ts +13 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_match.js +8 -0
- package/{script/deps/deno.land/std@0.208.0 → esm/deps/deno.land/std@0.209.0}/assert/assert_not_strict_equals.d.ts +3 -1
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_strict_equals.js +3 -1
- package/esm/deps/deno.land/std@0.209.0/assert/assert_object_match.d.ts +13 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_object_match.js +10 -2
- package/esm/deps/deno.land/std@0.209.0/assert/assert_rejects.d.ts +26 -0
- package/{script/deps/deno.land/std@0.208.0 → esm/deps/deno.land/std@0.209.0}/assert/assert_strict_equals.d.ts +6 -11
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_strict_equals.js +6 -11
- package/esm/deps/deno.land/std@0.209.0/assert/assert_string_includes.d.ts +13 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_string_includes.js +8 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_throws.d.ts +4 -31
- package/esm/deps/deno.land/std@0.209.0/assert/assertion_error.d.ts +14 -0
- package/esm/deps/deno.land/std@0.209.0/assert/assertion_error.js +18 -0
- package/esm/deps/deno.land/std@0.209.0/assert/equal.d.ts +14 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/equal.js +8 -0
- package/esm/deps/deno.land/std@0.209.0/assert/fail.d.ts +11 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/fail.js +8 -1
- package/esm/deps/deno.land/std@0.209.0/assert/unimplemented.d.ts +11 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/unimplemented.js +10 -1
- package/esm/deps/deno.land/std@0.209.0/assert/unreachable.d.ts +11 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/unreachable.js +10 -1
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/encoding/base64.d.ts +24 -8
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/encoding/base64.js +27 -27
- package/esm/deps/deno.land/std@0.209.0/media_types/_db.d.ts +5 -0
- package/esm/deps/deno.land/std@0.209.0/media_types/_db.js +33 -0
- package/esm/deps/deno.land/std@0.209.0/media_types/_util.d.ts +21 -0
- package/esm/deps/deno.land/std@0.209.0/media_types/_util.js +122 -0
- package/esm/deps/deno.land/std@0.209.0/media_types/content_type.d.ts +38 -0
- package/esm/deps/deno.land/std@0.209.0/media_types/content_type.js +55 -0
- package/esm/deps/deno.land/std@0.209.0/media_types/format_media_type.d.ts +16 -0
- package/esm/deps/deno.land/std@0.209.0/media_types/format_media_type.js +61 -0
- package/esm/deps/deno.land/std@0.209.0/media_types/get_charset.d.ts +15 -0
- package/esm/deps/deno.land/std@0.209.0/media_types/get_charset.js +37 -0
- package/esm/deps/deno.land/std@0.209.0/media_types/parse_media_type.d.ts +37 -0
- package/esm/deps/deno.land/std@0.209.0/media_types/parse_media_type.js +122 -0
- package/esm/deps/deno.land/std@0.209.0/media_types/type_by_extension.d.ts +17 -0
- package/esm/deps/deno.land/std@0.209.0/media_types/type_by_extension.js +24 -0
- package/esm/deps/deno.land/std@0.209.0/media_types/vendor/mime-db.v1.52.0.d.ts +8518 -0
- package/esm/deps/deno.land/std@0.209.0/media_types/vendor/mime-db.v1.52.0.js +8555 -0
- package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/glob_to_reg_exp.d.ts +1 -0
- package/esm/storage/0_storage.d.ts +26 -2
- package/esm/storage/0_storage.js +60 -5
- package/esm/storage/0_utilities.d.ts +2 -0
- package/esm/storage/0_utilities.js +33 -0
- package/esm/storage/1_storage_indexed_db.d.ts +8 -4
- package/esm/storage/1_storage_indexed_db.js +42 -11
- package/esm/storage/1_storage_local_storage.d.ts +7 -4
- package/esm/storage/1_storage_local_storage.js +23 -6
- package/esm/storage/1_storage_memory.d.ts +7 -2
- package/esm/storage/1_storage_memory.js +37 -6
- package/esm/storage/1_storage_session_storage.d.ts +6 -2
- package/esm/storage/1_storage_session_storage.js +23 -6
- package/esm/tl/0_tl_raw_writer.d.ts +1 -0
- package/esm/tl/0_tl_raw_writer.js +6 -0
- package/esm/tl/1_tl_object.js +6 -1
- package/esm/tl/3_deserialize.js +1 -1
- package/esm/transport/0_transport.d.ts +1 -1
- package/esm/transport/0_transport.js +0 -6
- package/esm/transport/1_transport_abridged.d.ts +1 -0
- package/esm/transport/1_transport_abridged.js +9 -5
- package/esm/transport/1_transport_intermediate.d.ts +1 -0
- package/esm/transport/1_transport_intermediate.js +8 -4
- package/esm/types/{1_chat.d.ts → 1_chat_p.d.ts} +7 -20
- package/esm/types/{1_chat.js → 1_chat_p.js} +4 -15
- package/esm/types/1_user.js +4 -2
- package/esm/types/3_message.d.ts +9 -8
- package/esm/types/3_message.js +20 -15
- package/esm/types/4_chat.d.ts +33 -0
- package/esm/types/4_chat.js +117 -0
- package/esm/utilities/{0_base64.js → 1_base64.js} +2 -1
- package/package.json +1 -1
- package/script/0_deps.d.ts +4 -3
- package/script/0_deps.js +6 -4
- package/script/1_utilities.d.ts +1 -1
- package/script/1_utilities.js +1 -1
- package/script/3_types.d.ts +2 -1
- package/script/3_types.js +2 -1
- package/script/4_constants.d.ts +1 -1
- package/script/4_constants.js +1 -1
- package/script/client/1_client_abstract.d.ts +1 -1
- package/script/client/3_types.d.ts +79 -2
- package/script/client/3_types.js +13 -0
- package/script/client/5_client.d.ts +31 -2
- package/script/client/5_client.js +471 -65
- package/script/connection/0_connection.d.ts +4 -0
- package/script/connection/0_connection.js +6 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_diff.d.ts +6 -5
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_diff.js +23 -24
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_format.js +2 -0
- package/script/deps/deno.land/std@0.209.0/assert/assert.d.ts +12 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert.js +11 -1
- package/script/deps/deno.land/std@0.209.0/assert/assert_almost_equals.d.ts +17 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_almost_equals.js +9 -10
- package/script/deps/deno.land/std@0.209.0/assert/assert_array_includes.d.ts +18 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_array_includes.js +6 -4
- package/{esm/deps/deno.land/std@0.208.0 → script/deps/deno.land/std@0.209.0}/assert/assert_equals.d.ts +4 -5
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_equals.js +4 -5
- package/script/deps/deno.land/std@0.209.0/assert/assert_exists.d.ts +13 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_exists.js +8 -0
- package/script/deps/deno.land/std@0.209.0/assert/assert_false.d.ts +14 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_false.js +11 -1
- package/script/deps/deno.land/std@0.209.0/assert/assert_greater.d.ts +14 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_greater.js +9 -0
- package/script/deps/deno.land/std@0.209.0/assert/assert_greater_or_equal.d.ts +14 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_greater_or_equal.js +9 -0
- package/script/deps/deno.land/std@0.209.0/assert/assert_instance_of.d.ts +17 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_instance_of.js +8 -0
- package/script/deps/deno.land/std@0.209.0/assert/assert_is_error.d.ts +18 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_is_error.js +24 -5
- package/script/deps/deno.land/std@0.209.0/assert/assert_less.d.ts +13 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_less.js +8 -0
- package/script/deps/deno.land/std@0.209.0/assert/assert_less_or_equal.d.ts +14 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_less_or_equal.js +9 -0
- package/script/deps/deno.land/std@0.209.0/assert/assert_match.d.ts +13 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_match.js +8 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_equals.d.ts +2 -1
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_equals.js +2 -1
- package/script/deps/deno.land/std@0.209.0/assert/assert_not_instance_of.d.ts +13 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_instance_of.js +8 -0
- package/script/deps/deno.land/std@0.209.0/assert/assert_not_match.d.ts +13 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_match.js +8 -0
- package/{esm/deps/deno.land/std@0.208.0 → script/deps/deno.land/std@0.209.0}/assert/assert_not_strict_equals.d.ts +3 -1
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_not_strict_equals.js +3 -1
- package/script/deps/deno.land/std@0.209.0/assert/assert_object_match.d.ts +13 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_object_match.js +10 -2
- package/script/deps/deno.land/std@0.209.0/assert/assert_rejects.d.ts +26 -0
- package/{esm/deps/deno.land/std@0.208.0 → script/deps/deno.land/std@0.209.0}/assert/assert_strict_equals.d.ts +6 -11
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_strict_equals.js +6 -11
- package/script/deps/deno.land/std@0.209.0/assert/assert_string_includes.d.ts +13 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_string_includes.js +8 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_throws.d.ts +4 -31
- package/script/deps/deno.land/std@0.209.0/assert/assertion_error.d.ts +14 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assertion_error.js +13 -7
- package/script/deps/deno.land/std@0.209.0/assert/equal.d.ts +14 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/equal.js +8 -0
- package/script/deps/deno.land/std@0.209.0/assert/fail.d.ts +11 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/fail.js +8 -1
- package/script/deps/deno.land/std@0.209.0/assert/unimplemented.d.ts +11 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/unimplemented.js +10 -1
- package/script/deps/deno.land/std@0.209.0/assert/unreachable.d.ts +11 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/unreachable.js +10 -1
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/encoding/base64.d.ts +24 -8
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/encoding/base64.js +27 -27
- package/script/deps/deno.land/std@0.209.0/media_types/_db.d.ts +5 -0
- package/script/deps/deno.land/std@0.209.0/media_types/_db.js +39 -0
- package/script/deps/deno.land/std@0.209.0/media_types/_util.d.ts +21 -0
- package/script/deps/deno.land/std@0.209.0/media_types/_util.js +132 -0
- package/script/deps/deno.land/std@0.209.0/media_types/content_type.d.ts +38 -0
- package/script/deps/deno.land/std@0.209.0/media_types/content_type.js +59 -0
- package/script/deps/deno.land/std@0.209.0/media_types/format_media_type.d.ts +16 -0
- package/script/deps/deno.land/std@0.209.0/media_types/format_media_type.js +65 -0
- package/script/deps/deno.land/std@0.209.0/media_types/get_charset.d.ts +15 -0
- package/script/deps/deno.land/std@0.209.0/media_types/get_charset.js +41 -0
- package/script/deps/deno.land/std@0.209.0/media_types/parse_media_type.d.ts +37 -0
- package/script/deps/deno.land/std@0.209.0/media_types/parse_media_type.js +126 -0
- package/script/deps/deno.land/std@0.209.0/media_types/type_by_extension.d.ts +17 -0
- package/script/deps/deno.land/std@0.209.0/media_types/type_by_extension.js +28 -0
- package/script/deps/deno.land/std@0.209.0/media_types/vendor/mime-db.v1.52.0.d.ts +8518 -0
- package/script/deps/deno.land/std@0.209.0/media_types/vendor/mime-db.v1.52.0.js +8557 -0
- package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/glob_to_reg_exp.d.ts +1 -0
- package/script/storage/0_storage.d.ts +26 -2
- package/script/storage/0_storage.js +60 -5
- package/script/storage/0_utilities.d.ts +2 -0
- package/script/storage/0_utilities.js +36 -1
- package/script/storage/1_storage_indexed_db.d.ts +8 -4
- package/script/storage/1_storage_indexed_db.js +41 -10
- package/script/storage/1_storage_local_storage.d.ts +7 -4
- package/script/storage/1_storage_local_storage.js +22 -5
- package/script/storage/1_storage_memory.d.ts +7 -2
- package/script/storage/1_storage_memory.js +36 -5
- package/script/storage/1_storage_session_storage.d.ts +6 -2
- package/script/storage/1_storage_session_storage.js +22 -5
- package/script/tl/0_tl_raw_writer.d.ts +1 -0
- package/script/tl/0_tl_raw_writer.js +6 -0
- package/script/tl/1_tl_object.js +6 -1
- package/script/tl/3_deserialize.js +1 -1
- package/script/transport/0_transport.d.ts +1 -1
- package/script/transport/0_transport.js +0 -6
- package/script/transport/1_transport_abridged.d.ts +1 -0
- package/script/transport/1_transport_abridged.js +9 -5
- package/script/transport/1_transport_intermediate.d.ts +1 -0
- package/script/transport/1_transport_intermediate.js +8 -4
- package/script/types/{1_chat.d.ts → 1_chat_p.d.ts} +7 -20
- package/script/types/{1_chat.js → 1_chat_p.js} +6 -17
- package/script/types/1_user.js +4 -2
- package/script/types/3_message.d.ts +9 -8
- package/script/types/3_message.js +20 -15
- package/script/types/4_chat.d.ts +33 -0
- package/script/types/4_chat.js +124 -0
- package/script/utilities/{0_base64.js → 1_base64.js} +2 -1
- package/esm/deps/deno.land/std@0.208.0/assert/assert.d.ts +0 -2
- package/esm/deps/deno.land/std@0.208.0/assert/assert.js +0 -8
- package/esm/deps/deno.land/std@0.208.0/assert/assert_almost_equals.d.ts +0 -18
- package/esm/deps/deno.land/std@0.208.0/assert/assert_array_includes.d.ts +0 -14
- package/esm/deps/deno.land/std@0.208.0/assert/assert_exists.d.ts +0 -5
- package/esm/deps/deno.land/std@0.208.0/assert/assert_false.d.ts +0 -4
- package/esm/deps/deno.land/std@0.208.0/assert/assert_false.js +0 -8
- package/esm/deps/deno.land/std@0.208.0/assert/assert_greater.d.ts +0 -5
- package/esm/deps/deno.land/std@0.208.0/assert/assert_greater_or_equal.d.ts +0 -5
- package/esm/deps/deno.land/std@0.208.0/assert/assert_instance_of.d.ts +0 -8
- package/esm/deps/deno.land/std@0.208.0/assert/assert_is_error.d.ts +0 -7
- package/esm/deps/deno.land/std@0.208.0/assert/assert_is_error.js +0 -29
- package/esm/deps/deno.land/std@0.208.0/assert/assert_less.d.ts +0 -5
- package/esm/deps/deno.land/std@0.208.0/assert/assert_less_or_equal.d.ts +0 -5
- package/esm/deps/deno.land/std@0.208.0/assert/assert_match.d.ts +0 -5
- package/esm/deps/deno.land/std@0.208.0/assert/assert_not_instance_of.d.ts +0 -5
- package/esm/deps/deno.land/std@0.208.0/assert/assert_not_match.d.ts +0 -5
- package/esm/deps/deno.land/std@0.208.0/assert/assert_object_match.d.ts +0 -5
- package/esm/deps/deno.land/std@0.208.0/assert/assert_rejects.d.ts +0 -64
- package/esm/deps/deno.land/std@0.208.0/assert/assert_string_includes.d.ts +0 -5
- package/esm/deps/deno.land/std@0.208.0/assert/assertion_error.d.ts +0 -4
- package/esm/deps/deno.land/std@0.208.0/assert/assertion_error.js +0 -12
- package/esm/deps/deno.land/std@0.208.0/assert/equal.d.ts +0 -6
- package/esm/deps/deno.land/std@0.208.0/assert/fail.d.ts +0 -4
- package/esm/deps/deno.land/std@0.208.0/assert/unimplemented.d.ts +0 -2
- package/esm/deps/deno.land/std@0.208.0/assert/unreachable.d.ts +0 -2
- package/script/deps/deno.land/std@0.208.0/assert/assert.d.ts +0 -2
- package/script/deps/deno.land/std@0.208.0/assert/assert_almost_equals.d.ts +0 -18
- package/script/deps/deno.land/std@0.208.0/assert/assert_array_includes.d.ts +0 -14
- package/script/deps/deno.land/std@0.208.0/assert/assert_exists.d.ts +0 -5
- package/script/deps/deno.land/std@0.208.0/assert/assert_false.d.ts +0 -4
- package/script/deps/deno.land/std@0.208.0/assert/assert_greater.d.ts +0 -5
- package/script/deps/deno.land/std@0.208.0/assert/assert_greater_or_equal.d.ts +0 -5
- package/script/deps/deno.land/std@0.208.0/assert/assert_instance_of.d.ts +0 -8
- package/script/deps/deno.land/std@0.208.0/assert/assert_is_error.d.ts +0 -7
- package/script/deps/deno.land/std@0.208.0/assert/assert_less.d.ts +0 -5
- package/script/deps/deno.land/std@0.208.0/assert/assert_less_or_equal.d.ts +0 -5
- package/script/deps/deno.land/std@0.208.0/assert/assert_match.d.ts +0 -5
- package/script/deps/deno.land/std@0.208.0/assert/assert_not_instance_of.d.ts +0 -5
- package/script/deps/deno.land/std@0.208.0/assert/assert_not_match.d.ts +0 -5
- package/script/deps/deno.land/std@0.208.0/assert/assert_object_match.d.ts +0 -5
- package/script/deps/deno.land/std@0.208.0/assert/assert_rejects.d.ts +0 -64
- package/script/deps/deno.land/std@0.208.0/assert/assert_string_includes.d.ts +0 -5
- package/script/deps/deno.land/std@0.208.0/assert/assertion_error.d.ts +0 -4
- package/script/deps/deno.land/std@0.208.0/assert/equal.d.ts +0 -6
- package/script/deps/deno.land/std@0.208.0/assert/fail.d.ts +0 -4
- package/script/deps/deno.land/std@0.208.0/assert/unimplemented.d.ts +0 -2
- package/script/deps/deno.land/std@0.208.0/assert/unreachable.d.ts +0 -2
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_rejects.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_throws.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/encoding/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/encoding/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/fmt/colors.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/fmt/colors.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/assert_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/assert_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/glob_to_reg_exp.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/normalize_string.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/normalize_string.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/strip_trailing_separators.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_interface.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_interface.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_os.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_os.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/separator.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/separator.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/separator.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/separator.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/separator.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/separator.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/to_namespaced_path.js +0 -0
- /package/esm/utilities/{0_base64.d.ts → 1_base64.d.ts} +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_constants.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/_format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_rejects.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/assert_throws.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/assert/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/encoding/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/encoding/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/fmt/colors.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/fmt/colors.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/assert_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/assert_path.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/common.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/format.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/glob_to_reg_exp.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/normalize_string.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/normalize_string.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/strip_trailing_separators.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_common/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_interface.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_interface.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_os.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/_os.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/common.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/format.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/join.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/common.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/format.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/join.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/separator.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/separator.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/posix/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/separator.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/separator.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/common.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/format.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/join.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/separator.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/separator.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.208.0 → std@0.209.0}/path/windows/to_namespaced_path.js +0 -0
- /package/script/utilities/{0_base64.d.ts → 1_base64.d.ts} +0 -0
package/esm/client/5_client.js
CHANGED
|
@@ -9,12 +9,12 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
9
9
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
10
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
11
|
};
|
|
12
|
-
var _Client_instances, _a, _Client_auth, _Client_sessionId, _Client_state, _Client_promises, _Client_toAcknowledge, _Client_updateState, _Client_publicKeys, _Client_autoStart, _Client_ignoreOutgoing, _Client_prefixes, _Client_namespaceProxies, _Client_constructContext, _Client_propagateConnectionState, _Client_lastPropagatedConnectionState, _Client_storageInited, _Client_setAuth, _Client_authKeyWasCreated, _Client_connectMutex, _Client_assertUser, _Client_assertBot, _Client_fetchState, _Client_connectionInited, _Client_initConnection, _Client_lastPropagatedAuthorizationState, _Client_propagateAuthorizationState, _Client_selfId, _Client_getSelfId, _Client_receiveLoop, _Client_pingInterval, _Client_pingLoop, _Client_pingLoopStarted, _Client_autoStarted, _Client_lastMsgId, _Client_invoke, _Client_handleInvokeError, _Client_processChats, _Client_processUsers, _Client_handleUpdateQueue, _Client_processUpdatesQueue, _Client_checkGap, _Client_checkChannelGap, _Client_lastUpdates, _Client_processUpdates, _Client_setUpdateStateDate, _Client_setUpdatePts, _Client_getLocalState, _Client_recoverUpdateGap, _Client_recoverChannelUpdateGap, _Client_getChannelAccessHash, _Client_getInputPeerInner, _Client_updatesToMessages, _Client_resolveSendAs, _Client_parseText, _Client_getMessagesInner, _Client_downloadInner, _Client_lastGetMe, _Client_getMe, _Client_handleUpdate, _Client_usernameResolver, _Client_constructReplyMarkup, _Client_assertMsgHas, _Client_handle, _Client_setMyInfo, _Client_getMyInfo;
|
|
13
|
-
import { debug, gunzip, Mutex } from "../0_deps.js";
|
|
12
|
+
var _Client_instances, _a, _Client_auth, _Client_sessionId, _Client_state, _Client_promises, _Client_toAcknowledge, _Client_updateState, _Client_publicKeys, _Client_autoStart, _Client_ignoreOutgoing, _Client_prefixes, _Client_namespaceProxies, _Client_constructContext, _Client_propagateConnectionState, _Client_lastPropagatedConnectionState, _Client_storageInited, _Client_setAuth, _Client_authKeyWasCreated, _Client_connectMutex, _Client_assertUser, _Client_assertBot, _Client_fetchState, _Client_connectionInited, _Client_initConnection, _Client_lastPropagatedAuthorizationState, _Client_propagateAuthorizationState, _Client_selfId, _Client_getSelfId, _Client_receiveLoop, _Client_pingLoopAbortSignal, _Client_pingInterval, _Client_pingLoop, _Client_pingLoopStarted, _Client_autoStarted, _Client_lastMsgId, _Client_invoke, _Client_handleInvokeError, _Client_processChats, _Client_processUsers, _Client_handleUpdateQueue, _Client_processUpdatesQueue, _Client_checkGap, _Client_checkChannelGap, _Client_lastUpdates, _Client_processUpdates, _Client_setUpdateStateDate, _Client_setUpdatePts, _Client_getLocalState, _Client_recoverUpdateGap, _Client_recoverChannelUpdateGap, _Client_getChannelAccessHash, _Client_getInputPeerInner, _Client_updatesToMessages, _Client_resolveSendAs, _Client_parseText, _Client_getMessagesInner, _Client_downloadInner, _Client_lastGetMe, _Client_getMe, _Client_handleUpdate, _Client_usernameResolver, _Client_constructReplyMarkup, _Client_assertMsgHas, _Client_handle, _Client_setMyInfo, _Client_getMyInfo, _Client_resolveFileId, _Client_sendMedia, _Client_sendChatUpdate, _Client_reassignChatLastMessage, _Client_chats, _Client_archivedChats, _Client_chatsLoadedFromStorage, _Client_getChatAnywhere, _Client_getChatList, _Client_loadChatsFromStorage, _Client_getLoadedChats, _Client_pinnedChats, _Client_pinnedArchiveChats, _Client_storageHadPinnedChats, _Client_pinnedChatsLoaded, _Client_loadPinnedChats, _Client_fetchPinnedChats, _Client_getPinnedChats, _Client_updatePinnedChats, _Client_fetchChats;
|
|
13
|
+
import { contentType, debug, gunzip, Mutex } from "../0_deps.js";
|
|
14
14
|
import { bigIntFromBuffer, cleanObject, drop, getRandomBigInt, getRandomId, mod, mustPrompt, mustPromptOneOf, Queue, sha1, UNREACHABLE, ZERO_CHANNEL_ID } from "../1_utilities.js";
|
|
15
15
|
import { as, functions, getChannelChatId, Message_, MessageContainer, name, peerToChatId, RPCResult, TLError, TLReader, types } from "../2_tl.js";
|
|
16
16
|
import { StorageMemory } from "../3_storage.js";
|
|
17
|
-
import { botCommandScopeToTlObject, constructCallbackQuery, constructChosenInlineResult, constructInlineQuery, constructMessage, constructUser, FileID, FileType, inlineQueryResultToTlObject, messageEntityToTlObject, replyMarkupToTlObject, ThumbnailSource } from "../3_types.js";
|
|
17
|
+
import { botCommandScopeToTlObject, constructCallbackQuery, constructChat, constructChat2, constructChat3, constructChosenInlineResult, constructInlineQuery, constructMessage, constructUser, FileID, FileType, getChatOrder, inlineQueryResultToTlObject, messageEntityToTlObject, replyMarkupToTlObject, ThumbnailSource } from "../3_types.js";
|
|
18
18
|
import { ACK_THRESHOLD, APP_VERSION, CHANNEL_DIFFERENCE_LIMIT_BOT, CHANNEL_DIFFERENCE_LIMIT_USER, DEVICE_MODEL, LANG_CODE, LANG_PACK, LAYER, MAX_CHANNEL_ID, MAX_CHAT_ID, STICKER_SET_NAME_TTL, SYSTEM_LANG_CODE, SYSTEM_VERSION, USERNAME_TTL } from "../4_constants.js";
|
|
19
19
|
import { AuthKeyUnregistered, FloodWait, Migrate, PasswordHashInvalid, PhoneNumberInvalid, SessionPasswordNeeded, upgradeInstance } from "../4_errors.js";
|
|
20
20
|
import { parseHtml } from "./0_html.js";
|
|
@@ -23,6 +23,7 @@ import { checkPassword } from "./0_password.js";
|
|
|
23
23
|
import { getFileContents, getUsername, isChannelPtsUpdate, isHttpUrl, isPtsUpdate, resolve } from "./0_utilities.js";
|
|
24
24
|
import { ClientAbstract } from "./1_client_abstract.js";
|
|
25
25
|
import { ClientPlain } from "./2_client_plain.js";
|
|
26
|
+
import { getChatListId, } from "./3_types.js";
|
|
26
27
|
import { Composer, concat, flatten, skip } from "./4_composer.js";
|
|
27
28
|
const d = debug("Client");
|
|
28
29
|
const dGap = debug("Client/recoverUpdateGap");
|
|
@@ -220,6 +221,11 @@ export class Client extends ClientAbstract {
|
|
|
220
221
|
const replyToMessageId = getReplyToMessageId(params?.quote, effectiveMessage);
|
|
221
222
|
return this.sendPhoto(effectiveMessage.chat.id, photo, { ...params, replyToMessageId });
|
|
222
223
|
},
|
|
224
|
+
replyDocument: (document, params) => {
|
|
225
|
+
const effectiveMessage = mustGetMsg();
|
|
226
|
+
const replyToMessageId = getReplyToMessageId(params?.quote, effectiveMessage);
|
|
227
|
+
return this.sendDocument(effectiveMessage.chat.id, document, { ...params, replyToMessageId });
|
|
228
|
+
},
|
|
223
229
|
delete: () => {
|
|
224
230
|
const effectiveMessage = mustGetMsg();
|
|
225
231
|
return this.deleteMessage(effectiveMessage.chat.id, effectiveMessage.id);
|
|
@@ -290,7 +296,6 @@ export class Client extends ClientAbstract {
|
|
|
290
296
|
const connectionState = connected ? "ready" : "notConnected";
|
|
291
297
|
if (this.connected == connected && __classPrivateFieldGet(this, _Client_lastPropagatedConnectionState, "f") != connectionState) {
|
|
292
298
|
__classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateConnectionState).call(this, connectionState);
|
|
293
|
-
__classPrivateFieldSet(this, _Client_lastPropagatedConnectionState, connectionState, "f");
|
|
294
299
|
}
|
|
295
300
|
}
|
|
296
301
|
finally {
|
|
@@ -305,6 +310,7 @@ export class Client extends ClientAbstract {
|
|
|
305
310
|
_Client_connectionInited.set(this, false);
|
|
306
311
|
_Client_lastPropagatedAuthorizationState.set(this, null);
|
|
307
312
|
_Client_selfId.set(this, null);
|
|
313
|
+
_Client_pingLoopAbortSignal.set(this, null);
|
|
308
314
|
_Client_pingInterval.set(this, 60 * 1000); // 60 seconds
|
|
309
315
|
_Client_pingLoopStarted.set(this, false);
|
|
310
316
|
_Client_autoStarted.set(this, false);
|
|
@@ -345,6 +351,13 @@ export class Client extends ClientAbstract {
|
|
|
345
351
|
});
|
|
346
352
|
//#region Composer
|
|
347
353
|
_Client_handle.set(this, skip);
|
|
354
|
+
_Client_chats.set(this, new Map());
|
|
355
|
+
_Client_archivedChats.set(this, new Map());
|
|
356
|
+
_Client_chatsLoadedFromStorage.set(this, false);
|
|
357
|
+
_Client_pinnedChats.set(this, new Array());
|
|
358
|
+
_Client_pinnedArchiveChats.set(this, new Array());
|
|
359
|
+
_Client_storageHadPinnedChats.set(this, false);
|
|
360
|
+
_Client_pinnedChatsLoaded.set(this, false);
|
|
348
361
|
this.storage = storage ?? new StorageMemory();
|
|
349
362
|
this.parseMode = params?.parseMode ?? null;
|
|
350
363
|
this.appVersion = params?.appVersion ?? APP_VERSION;
|
|
@@ -357,16 +370,36 @@ export class Client extends ClientAbstract {
|
|
|
357
370
|
__classPrivateFieldSet(this, _Client_autoStart, params?.autoStart ?? true, "f");
|
|
358
371
|
__classPrivateFieldSet(this, _Client_ignoreOutgoing, params?.ignoreOutgoing ?? null, "f");
|
|
359
372
|
__classPrivateFieldSet(this, _Client_prefixes, params?.prefixes, "f");
|
|
373
|
+
const transportProvider = this.transportProvider;
|
|
374
|
+
this.transportProvider = (params) => {
|
|
375
|
+
const transport = transportProvider(params);
|
|
376
|
+
transport.connection.callback = {
|
|
377
|
+
read: async (count) => {
|
|
378
|
+
const key = params.cdn ? "netstat_cdn_read" : "netstat_messages_read";
|
|
379
|
+
await this.storage.incr([key], count);
|
|
380
|
+
},
|
|
381
|
+
write: async (count) => {
|
|
382
|
+
const key = params.cdn ? "netstat_cdn_write" : "netstat_messages_write";
|
|
383
|
+
await this.storage.incr([key], count);
|
|
384
|
+
},
|
|
385
|
+
};
|
|
386
|
+
return transport;
|
|
387
|
+
};
|
|
360
388
|
if (params?.defaultHandlers ?? true) {
|
|
361
389
|
this.on("connectionState", ({ connectionState }, next) => {
|
|
362
390
|
drop((async () => {
|
|
363
391
|
if (connectionState == "notConnected") {
|
|
392
|
+
if (!this.transport?.transport.initialized) {
|
|
393
|
+
d("not reconnecting");
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
364
396
|
let delay = 5;
|
|
365
397
|
while (!this.connected) {
|
|
366
398
|
d("reconnecting");
|
|
367
399
|
try {
|
|
368
400
|
await this.connect();
|
|
369
401
|
d("reconnected");
|
|
402
|
+
drop(__classPrivateFieldGet(this, _Client_instances, "m", _Client_recoverUpdateGap).call(this, "reconnect"));
|
|
370
403
|
break;
|
|
371
404
|
}
|
|
372
405
|
catch (err) {
|
|
@@ -466,10 +499,11 @@ export class Client extends ClientAbstract {
|
|
|
466
499
|
release();
|
|
467
500
|
}
|
|
468
501
|
}
|
|
469
|
-
async [(_Client_auth = new WeakMap(), _Client_sessionId = new WeakMap(), _Client_state = new WeakMap(), _Client_promises = new WeakMap(), _Client_toAcknowledge = new WeakMap(), _Client_updateState = new WeakMap(), _Client_publicKeys = new WeakMap(), _Client_autoStart = new WeakMap(), _Client_ignoreOutgoing = new WeakMap(), _Client_prefixes = new WeakMap(), _Client_namespaceProxies = new WeakMap(), _Client_constructContext = new WeakMap(), _Client_lastPropagatedConnectionState = new WeakMap(), _Client_storageInited = new WeakMap(), _Client_authKeyWasCreated = new WeakMap(), _Client_connectMutex = new WeakMap(), _Client_connectionInited = new WeakMap(), _Client_lastPropagatedAuthorizationState = new WeakMap(), _Client_selfId = new WeakMap(), _Client_pingInterval = new WeakMap(), _Client_pingLoopStarted = new WeakMap(), _Client_autoStarted = new WeakMap(), _Client_lastMsgId = new WeakMap(), _Client_handleInvokeError = new WeakMap(), _Client_handleUpdateQueue = new WeakMap(), _Client_processUpdatesQueue = new WeakMap(), _Client_lastUpdates = new WeakMap(), _Client_lastGetMe = new WeakMap(), _Client_usernameResolver = new WeakMap(), _Client_handle = new WeakMap(), _Client_instances = new WeakSet(), _Client_propagateConnectionState = function _Client_propagateConnectionState(connectionState) {
|
|
502
|
+
async [(_Client_auth = new WeakMap(), _Client_sessionId = new WeakMap(), _Client_state = new WeakMap(), _Client_promises = new WeakMap(), _Client_toAcknowledge = new WeakMap(), _Client_updateState = new WeakMap(), _Client_publicKeys = new WeakMap(), _Client_autoStart = new WeakMap(), _Client_ignoreOutgoing = new WeakMap(), _Client_prefixes = new WeakMap(), _Client_namespaceProxies = new WeakMap(), _Client_constructContext = new WeakMap(), _Client_lastPropagatedConnectionState = new WeakMap(), _Client_storageInited = new WeakMap(), _Client_authKeyWasCreated = new WeakMap(), _Client_connectMutex = new WeakMap(), _Client_connectionInited = new WeakMap(), _Client_lastPropagatedAuthorizationState = new WeakMap(), _Client_selfId = new WeakMap(), _Client_pingLoopAbortSignal = new WeakMap(), _Client_pingInterval = new WeakMap(), _Client_pingLoopStarted = new WeakMap(), _Client_autoStarted = new WeakMap(), _Client_lastMsgId = new WeakMap(), _Client_handleInvokeError = new WeakMap(), _Client_handleUpdateQueue = new WeakMap(), _Client_processUpdatesQueue = new WeakMap(), _Client_lastUpdates = new WeakMap(), _Client_lastGetMe = new WeakMap(), _Client_usernameResolver = new WeakMap(), _Client_handle = new WeakMap(), _Client_chats = new WeakMap(), _Client_archivedChats = new WeakMap(), _Client_chatsLoadedFromStorage = new WeakMap(), _Client_pinnedChats = new WeakMap(), _Client_pinnedArchiveChats = new WeakMap(), _Client_storageHadPinnedChats = new WeakMap(), _Client_pinnedChatsLoaded = new WeakMap(), _Client_instances = new WeakSet(), _Client_propagateConnectionState = function _Client_propagateConnectionState(connectionState) {
|
|
470
503
|
__classPrivateFieldGet(this, _Client_handleUpdateQueue, "f").add(async () => {
|
|
471
504
|
await __classPrivateFieldGet(this, _Client_handle, "f").call(this, await __classPrivateFieldGet(this, _Client_constructContext, "f").call(this, { connectionState }), resolve);
|
|
472
505
|
});
|
|
506
|
+
__classPrivateFieldSet(this, _Client_lastPropagatedConnectionState, connectionState, "f");
|
|
473
507
|
}, _Client_setAuth = async function _Client_setAuth(key) {
|
|
474
508
|
const hash = await sha1(key);
|
|
475
509
|
const id = bigIntFromBuffer(hash.slice(-8), true, false);
|
|
@@ -494,9 +528,10 @@ export class Client extends ClientAbstract {
|
|
|
494
528
|
await this.reconnect(newDc);
|
|
495
529
|
d("migrated to DC%s", newDc);
|
|
496
530
|
}
|
|
497
|
-
disconnect() {
|
|
531
|
+
async disconnect() {
|
|
498
532
|
__classPrivateFieldSet(this, _Client_connectionInited, false, "f");
|
|
499
|
-
|
|
533
|
+
await super.disconnect();
|
|
534
|
+
__classPrivateFieldGet(this, _Client_pingLoopAbortSignal, "f")?.abort();
|
|
500
535
|
}
|
|
501
536
|
/**
|
|
502
537
|
* Calls [initConnection](1) and authorizes the client with one of the following:
|
|
@@ -536,6 +571,7 @@ export class Client extends ClientAbstract {
|
|
|
536
571
|
try {
|
|
537
572
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_fetchState).call(this, "authorize");
|
|
538
573
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateAuthorizationState).call(this, true);
|
|
574
|
+
drop(__classPrivateFieldGet(this, _Client_instances, "m", _Client_recoverUpdateGap).call(this, "authorize"));
|
|
539
575
|
d("already authorized");
|
|
540
576
|
return;
|
|
541
577
|
}
|
|
@@ -684,19 +720,9 @@ export class Client extends ClientAbstract {
|
|
|
684
720
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initConnection).call(this);
|
|
685
721
|
if (!__classPrivateFieldGet(this, _Client_authKeyWasCreated, "f")) {
|
|
686
722
|
drop(__classPrivateFieldGet(this, _Client_instances, "m", _Client_fetchState).call(this, "start"));
|
|
723
|
+
drop(__classPrivateFieldGet(this, _Client_instances, "m", _Client_recoverUpdateGap).call(this, "start"));
|
|
687
724
|
return;
|
|
688
725
|
}
|
|
689
|
-
try {
|
|
690
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_fetchState).call(this, "authorize");
|
|
691
|
-
d("already authorized");
|
|
692
|
-
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateAuthorizationState).call(this, true);
|
|
693
|
-
return;
|
|
694
|
-
}
|
|
695
|
-
catch (err) {
|
|
696
|
-
if (!(err instanceof AuthKeyUnregistered)) {
|
|
697
|
-
throw err;
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
726
|
await this.authorize(params);
|
|
701
727
|
}
|
|
702
728
|
/**
|
|
@@ -767,7 +793,16 @@ export class Client extends ClientAbstract {
|
|
|
767
793
|
}
|
|
768
794
|
catch (err) {
|
|
769
795
|
dRecv("failed to decrypt message: %o", err);
|
|
770
|
-
drop(
|
|
796
|
+
drop((async () => {
|
|
797
|
+
try {
|
|
798
|
+
await this.disconnect();
|
|
799
|
+
}
|
|
800
|
+
catch {
|
|
801
|
+
//
|
|
802
|
+
}
|
|
803
|
+
await this.connect();
|
|
804
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_recoverUpdateGap).call(this, "decryption");
|
|
805
|
+
})());
|
|
771
806
|
continue;
|
|
772
807
|
}
|
|
773
808
|
const messages = decrypted instanceof MessageContainer ? decrypted.messages : [decrypted];
|
|
@@ -861,9 +896,15 @@ export class Client extends ClientAbstract {
|
|
|
861
896
|
UNREACHABLE();
|
|
862
897
|
}
|
|
863
898
|
}, _Client_pingLoop = async function _Client_pingLoop() {
|
|
899
|
+
__classPrivateFieldSet(this, _Client_pingLoopAbortSignal, new AbortController(), "f");
|
|
864
900
|
while (this.connected) {
|
|
865
|
-
await new Promise((r) => setTimeout(r, __classPrivateFieldGet(this, _Client_pingInterval, "f")));
|
|
866
901
|
try {
|
|
902
|
+
await new Promise((resolve, reject) => {
|
|
903
|
+
setTimeout(resolve, __classPrivateFieldGet(this, _Client_pingInterval, "f"));
|
|
904
|
+
__classPrivateFieldGet(this, _Client_pingLoopAbortSignal, "f").signal.onabort = () => {
|
|
905
|
+
reject(__classPrivateFieldGet(this, _Client_pingLoopAbortSignal, "f")?.signal.reason);
|
|
906
|
+
};
|
|
907
|
+
});
|
|
867
908
|
await this.invoke(new functions.ping_delay_disconnect({ ping_id: getRandomId(), disconnect_delay: __classPrivateFieldGet(this, _Client_pingInterval, "f") / 1000 + 15 }));
|
|
868
909
|
if (Date.now() - __classPrivateFieldGet(this, _Client_lastUpdates, "f").getTime() >= 15 * 60 * 1000) {
|
|
869
910
|
drop(__classPrivateFieldGet(this, _Client_instances, "m", _Client_recoverUpdateGap).call(this, "lastUpdates"));
|
|
@@ -1203,6 +1244,8 @@ export class Client extends ClientAbstract {
|
|
|
1203
1244
|
}
|
|
1204
1245
|
else if (difference instanceof types.updates.DifferenceTooLong) {
|
|
1205
1246
|
await this.storage.deleteMessages();
|
|
1247
|
+
await this.storage.removeChats(0);
|
|
1248
|
+
await this.storage.removeChats(1);
|
|
1206
1249
|
state.pts = difference.pts;
|
|
1207
1250
|
dGap("received differenceTooLong");
|
|
1208
1251
|
}
|
|
@@ -1218,6 +1261,7 @@ export class Client extends ClientAbstract {
|
|
|
1218
1261
|
}
|
|
1219
1262
|
finally {
|
|
1220
1263
|
this.stateChangeHandler(this.connected);
|
|
1264
|
+
__classPrivateFieldSet(this, _Client_lastUpdates, new Date(), "f");
|
|
1221
1265
|
}
|
|
1222
1266
|
}, _Client_recoverChannelUpdateGap = async function _Client_recoverChannelUpdateGap(channelId, source) {
|
|
1223
1267
|
dGapC("recovering channel update gap [%o, %s]", channelId, source);
|
|
@@ -1245,7 +1289,7 @@ export class Client extends ClientAbstract {
|
|
|
1245
1289
|
break;
|
|
1246
1290
|
}
|
|
1247
1291
|
else if (difference instanceof types.updates.ChannelDifferenceTooLong) {
|
|
1248
|
-
// invalidate messages
|
|
1292
|
+
// TODO: invalidate messages
|
|
1249
1293
|
dGapC("received channelDifferenceTooLong");
|
|
1250
1294
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processChats).call(this, difference.chats);
|
|
1251
1295
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUsers).call(this, difference.users);
|
|
@@ -1372,6 +1416,13 @@ export class Client extends ClientAbstract {
|
|
|
1372
1416
|
if ("users" in result) {
|
|
1373
1417
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_processUsers).call(this, result.users);
|
|
1374
1418
|
}
|
|
1419
|
+
if ("messages" in result) {
|
|
1420
|
+
for (const message of result.messages) {
|
|
1421
|
+
if (message instanceof types.Message || message instanceof types.MessageService) {
|
|
1422
|
+
await this.storage.setMessage(peerToChatId(message.peer_id), message.id, message);
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1375
1426
|
}
|
|
1376
1427
|
if (result instanceof types.messages.Messages) {
|
|
1377
1428
|
for (const message of result.messages) {
|
|
@@ -1517,7 +1568,7 @@ export class Client extends ClientAbstract {
|
|
|
1517
1568
|
if (shouldFetch) {
|
|
1518
1569
|
if (peer instanceof types.InputPeerChannel) {
|
|
1519
1570
|
messages_ = await this.invoke(new functions.channels.getMessages({
|
|
1520
|
-
channel: new types.InputChannel(
|
|
1571
|
+
channel: new types.InputChannel(peer),
|
|
1521
1572
|
id: messageIds.map((v) => new types.InputMessageID({ id: v })),
|
|
1522
1573
|
})).then((v) => v[as](types.messages.ChannelMessages).messages);
|
|
1523
1574
|
}
|
|
@@ -2123,26 +2174,10 @@ export class Client extends ClientAbstract {
|
|
|
2123
2174
|
let media = null;
|
|
2124
2175
|
const spoiler = params?.hasSpoiler ? true : undefined;
|
|
2125
2176
|
if (typeof photo === "string") {
|
|
2126
|
-
|
|
2127
|
-
try {
|
|
2128
|
-
fileId = FileID.decode(photo);
|
|
2129
|
-
}
|
|
2130
|
-
catch (err) {
|
|
2131
|
-
d("fileId: %o", err);
|
|
2132
|
-
}
|
|
2177
|
+
const fileId = __classPrivateFieldGet(this, _Client_instances, "m", _Client_resolveFileId).call(this, photo, FileType.Photo);
|
|
2133
2178
|
if (fileId != null) {
|
|
2134
|
-
if (fileId.fileType != FileType.Photo) {
|
|
2135
|
-
UNREACHABLE();
|
|
2136
|
-
}
|
|
2137
|
-
if (fileId.params.mediaId == undefined || fileId.params.accessHash == undefined || fileId.params.fileReference == undefined) {
|
|
2138
|
-
UNREACHABLE();
|
|
2139
|
-
}
|
|
2140
2179
|
media = new types.InputMediaPhoto({
|
|
2141
|
-
id: new types.InputPhoto(
|
|
2142
|
-
id: fileId.params.mediaId,
|
|
2143
|
-
access_hash: fileId.params.accessHash,
|
|
2144
|
-
file_reference: fileId.params.fileReference,
|
|
2145
|
-
}),
|
|
2180
|
+
id: new types.InputPhoto(fileId),
|
|
2146
2181
|
spoiler,
|
|
2147
2182
|
});
|
|
2148
2183
|
}
|
|
@@ -2157,33 +2192,150 @@ export class Client extends ClientAbstract {
|
|
|
2157
2192
|
media = new types.InputMediaUploadedPhoto({ file, spoiler });
|
|
2158
2193
|
}
|
|
2159
2194
|
}
|
|
2160
|
-
const
|
|
2161
|
-
const randomId = getRandomId();
|
|
2162
|
-
const silent = params?.disableNotification ? true : undefined;
|
|
2163
|
-
const noforwards = params?.protectContent ? true : undefined;
|
|
2164
|
-
const replyToMsgId = params?.replyToMessageId;
|
|
2165
|
-
const topMsgId = params?.messageThreadId;
|
|
2166
|
-
const sendAs = params?.sendAs ? await this.getInputPeer(params.sendAs) : undefined; // TODO: check default sendAs
|
|
2167
|
-
const replyMarkup = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_constructReplyMarkup).call(this, params);
|
|
2168
|
-
const caption_ = params?.caption;
|
|
2169
|
-
const parseResult = caption_ !== undefined ? __classPrivateFieldGet(this, _Client_instances, "m", _Client_parseText).call(this, caption_, { parseMode: params?.parseMode, entities: params?.captionEntities }) : undefined;
|
|
2170
|
-
const caption = parseResult === undefined ? undefined : parseResult[0];
|
|
2171
|
-
const captionEntities = parseResult === undefined ? undefined : parseResult[1];
|
|
2172
|
-
const result = await this.invoke(new functions.messages.sendMedia({
|
|
2173
|
-
peer,
|
|
2174
|
-
random_id: randomId,
|
|
2175
|
-
silent,
|
|
2176
|
-
noforwards,
|
|
2177
|
-
reply_markup: replyMarkup,
|
|
2178
|
-
reply_to: replyToMsgId !== undefined ? new types.InputReplyToMessage({ reply_to_msg_id: replyToMsgId, top_msg_id: topMsgId }) : undefined,
|
|
2179
|
-
send_as: sendAs,
|
|
2180
|
-
media,
|
|
2181
|
-
message: caption ?? "",
|
|
2182
|
-
entities: captionEntities,
|
|
2183
|
-
}));
|
|
2184
|
-
const message = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
|
|
2195
|
+
const message = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_sendMedia).call(this, chatId, media, params);
|
|
2185
2196
|
return __classPrivateFieldGet(_a, _a, "m", _Client_assertMsgHas).call(_a, message, "photo");
|
|
2186
2197
|
}
|
|
2198
|
+
/**
|
|
2199
|
+
* Send a document.
|
|
2200
|
+
*
|
|
2201
|
+
* @method
|
|
2202
|
+
* @param chatId The chat to send the document to.
|
|
2203
|
+
* @param document The document to send.
|
|
2204
|
+
*/
|
|
2205
|
+
async sendDocument(chatId, document, params) {
|
|
2206
|
+
let media = null;
|
|
2207
|
+
const spoiler = params?.hasSpoiler ? true : undefined;
|
|
2208
|
+
if (typeof document === "string") {
|
|
2209
|
+
const fileId = __classPrivateFieldGet(this, _Client_instances, "m", _Client_resolveFileId).call(this, document, FileType.Document);
|
|
2210
|
+
if (fileId != null) {
|
|
2211
|
+
media = new types.InputMediaDocument({
|
|
2212
|
+
id: new types.InputDocument(fileId),
|
|
2213
|
+
spoiler,
|
|
2214
|
+
});
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2217
|
+
if (media == null) {
|
|
2218
|
+
if (typeof document === "string" && isHttpUrl(document)) {
|
|
2219
|
+
media = new types.InputMediaDocumentExternal({ url: document, spoiler });
|
|
2220
|
+
}
|
|
2221
|
+
else {
|
|
2222
|
+
const [contents, fileName_] = await getFileContents(document);
|
|
2223
|
+
const fileName = params?.fileName ?? fileName_;
|
|
2224
|
+
const mimeType = params?.mimeType ?? contentType(fileName.split(".").slice(-1)[0]) ?? "application/octet-stream";
|
|
2225
|
+
const file = await this.upload(contents, { fileName, chunkSize: params?.chunkSize, signal: params?.signal });
|
|
2226
|
+
media = new types.InputMediaUploadedDocument({
|
|
2227
|
+
file,
|
|
2228
|
+
spoiler,
|
|
2229
|
+
attributes: [new types.DocumentAttributeFilename({ file_name: fileName })],
|
|
2230
|
+
mime_type: mimeType,
|
|
2231
|
+
});
|
|
2232
|
+
}
|
|
2233
|
+
}
|
|
2234
|
+
const message = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_sendMedia).call(this, chatId, media, params);
|
|
2235
|
+
return __classPrivateFieldGet(_a, _a, "m", _Client_assertMsgHas).call(_a, message, "document");
|
|
2236
|
+
}
|
|
2237
|
+
/**
|
|
2238
|
+
* Get network statistics. This might not always be available.
|
|
2239
|
+
*
|
|
2240
|
+
* @method
|
|
2241
|
+
*/
|
|
2242
|
+
async getNetworkStatistics() {
|
|
2243
|
+
const [messagesRead, messagesWrite, cdnRead, cdnWrite] = await Promise.all([
|
|
2244
|
+
this.storage.get(["netstat_messages_read"]),
|
|
2245
|
+
this.storage.get(["netstat_messages_write"]),
|
|
2246
|
+
this.storage.get(["netstat_cdn_read"]),
|
|
2247
|
+
this.storage.get(["netstat_cdn_write"]),
|
|
2248
|
+
]);
|
|
2249
|
+
const messages = {
|
|
2250
|
+
sent: Number(messagesWrite || 0),
|
|
2251
|
+
received: Number(messagesRead || 0),
|
|
2252
|
+
};
|
|
2253
|
+
const cdn = {
|
|
2254
|
+
sent: Number(cdnWrite || 0),
|
|
2255
|
+
received: Number(cdnRead || 0),
|
|
2256
|
+
};
|
|
2257
|
+
return { messages, cdn };
|
|
2258
|
+
}
|
|
2259
|
+
/**
|
|
2260
|
+
* Get chats.
|
|
2261
|
+
*
|
|
2262
|
+
* @method
|
|
2263
|
+
*/
|
|
2264
|
+
async getChats(params) {
|
|
2265
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_assertUser).call(this, "getChats");
|
|
2266
|
+
if (!__classPrivateFieldGet(this, _Client_chatsLoadedFromStorage, "f")) {
|
|
2267
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_loadChatsFromStorage).call(this);
|
|
2268
|
+
}
|
|
2269
|
+
if (params?.after?.id && !__classPrivateFieldGet(this, _Client_chats, "f").has(params.after.id)) {
|
|
2270
|
+
throw new Error("Invalid after");
|
|
2271
|
+
}
|
|
2272
|
+
let limit = params?.limit ?? 100;
|
|
2273
|
+
if (limit <= 0 || limit > 100) {
|
|
2274
|
+
limit = 100;
|
|
2275
|
+
}
|
|
2276
|
+
const listId = getChatListId(params?.from ?? "main");
|
|
2277
|
+
let chats = __classPrivateFieldGet(this, _Client_instances, "m", _Client_getLoadedChats).call(this, listId);
|
|
2278
|
+
if (params?.after) {
|
|
2279
|
+
chats = chats
|
|
2280
|
+
.filter((v) => v.id < params.after.id);
|
|
2281
|
+
}
|
|
2282
|
+
if (chats.length < limit) {
|
|
2283
|
+
d("have only %d chats but %d more is needed", chats.length, limit - chats.length);
|
|
2284
|
+
if (!await this.storage.hasAllChats(listId)) {
|
|
2285
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_fetchChats).call(this, listId, limit, params?.after);
|
|
2286
|
+
return await this.getChats(params);
|
|
2287
|
+
}
|
|
2288
|
+
}
|
|
2289
|
+
chats = chats.slice(0, limit);
|
|
2290
|
+
return chats;
|
|
2291
|
+
}
|
|
2292
|
+
/**
|
|
2293
|
+
* Get chat history.
|
|
2294
|
+
*
|
|
2295
|
+
* @param chatId The identifier of the chat to get its history.
|
|
2296
|
+
* @method
|
|
2297
|
+
*/
|
|
2298
|
+
async getHistory(chatId, params) {
|
|
2299
|
+
let limit = params?.limit ?? 100;
|
|
2300
|
+
if (limit <= 0) {
|
|
2301
|
+
limit = 1;
|
|
2302
|
+
}
|
|
2303
|
+
else if (limit > 100) {
|
|
2304
|
+
limit = 100;
|
|
2305
|
+
}
|
|
2306
|
+
let offsetId = params?.after?.id ?? 0;
|
|
2307
|
+
if (offsetId < 0) {
|
|
2308
|
+
offsetId = 0;
|
|
2309
|
+
}
|
|
2310
|
+
const peer = await this.getInputPeer(chatId);
|
|
2311
|
+
const messages = new Array();
|
|
2312
|
+
for (const message_ of await this.storage.getHistory(peerToChatId(peer), offsetId, limit)) {
|
|
2313
|
+
const message = await constructMessage(message_, this[getEntity].bind(this), this.getMessage.bind(this), this[getStickerSetName].bind(this), false);
|
|
2314
|
+
messages.push(message);
|
|
2315
|
+
}
|
|
2316
|
+
if (messages.length < limit) {
|
|
2317
|
+
d("have only %d messages but need %d more", messages.length, limit - messages.length);
|
|
2318
|
+
offsetId = messages[messages.length - 1].id; // TODO: track id of oldest message and don't send requests for it
|
|
2319
|
+
const result = await this.api.messages.getHistory({
|
|
2320
|
+
peer: peer,
|
|
2321
|
+
offset_id: offsetId,
|
|
2322
|
+
offset_date: 0,
|
|
2323
|
+
add_offset: 0,
|
|
2324
|
+
limit,
|
|
2325
|
+
max_id: 0,
|
|
2326
|
+
min_id: 0,
|
|
2327
|
+
hash: 0n,
|
|
2328
|
+
});
|
|
2329
|
+
if (!("messages" in result)) {
|
|
2330
|
+
UNREACHABLE();
|
|
2331
|
+
}
|
|
2332
|
+
for (const message_ of result.messages) {
|
|
2333
|
+
const message = await constructMessage(message_, this[getEntity].bind(this), this.getMessage.bind(this), this[getStickerSetName].bind(this), false);
|
|
2334
|
+
messages.push(message);
|
|
2335
|
+
}
|
|
2336
|
+
}
|
|
2337
|
+
return messages;
|
|
2338
|
+
}
|
|
2187
2339
|
}
|
|
2188
2340
|
_a = Client, _Client_getMe = async function _Client_getMe() {
|
|
2189
2341
|
if (__classPrivateFieldGet(this, _Client_lastGetMe, "f") != null) {
|
|
@@ -2241,9 +2393,11 @@ async function _Client_handleUpdate(update) {
|
|
|
2241
2393
|
pts_count: update.pts_count,
|
|
2242
2394
|
});
|
|
2243
2395
|
}
|
|
2244
|
-
if (update instanceof types.UpdateNewMessage || update instanceof types.
|
|
2396
|
+
if (update instanceof types.UpdateNewMessage || update instanceof types.UpdateNewChannelMessage || update instanceof types.UpdateEditMessage || update instanceof types.UpdateEditChannelMessage) {
|
|
2245
2397
|
if (update.message instanceof types.Message || update.message instanceof types.MessageService) {
|
|
2246
|
-
|
|
2398
|
+
const chatId = peerToChatId(update.message.peer_id);
|
|
2399
|
+
await this.storage.setMessage(chatId, update.message.id, update.message);
|
|
2400
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_reassignChatLastMessage).call(this, chatId);
|
|
2247
2401
|
}
|
|
2248
2402
|
}
|
|
2249
2403
|
if (update instanceof types.UpdateNewMessage ||
|
|
@@ -2273,6 +2427,7 @@ async function _Client_handleUpdate(update) {
|
|
|
2273
2427
|
deletedMessages.push(await constructMessage(message, this[getEntity].bind(this), this.getMessage.bind(this), this[getStickerSetName].bind(this)));
|
|
2274
2428
|
}
|
|
2275
2429
|
await this.storage.setMessage(chatId, messageId, null);
|
|
2430
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_reassignChatLastMessage).call(this, chatId);
|
|
2276
2431
|
}
|
|
2277
2432
|
}
|
|
2278
2433
|
if (deletedMessages.length > 0) {
|
|
@@ -2288,6 +2443,7 @@ async function _Client_handleUpdate(update) {
|
|
|
2288
2443
|
deletedMessages.push(await constructMessage(message, this[getEntity].bind(this), this.getMessage.bind(this), this[getStickerSetName].bind(this)));
|
|
2289
2444
|
}
|
|
2290
2445
|
await this.storage.setMessage(chatId, messageId, null);
|
|
2446
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_reassignChatLastMessage).call(this, chatId);
|
|
2291
2447
|
}
|
|
2292
2448
|
if (deletedMessages.length > 0) {
|
|
2293
2449
|
await __classPrivateFieldGet(this, _Client_handle, "f").call(this, await __classPrivateFieldGet(this, _Client_constructContext, "f").call(this, { deletedMessages: deletedMessages }), resolve);
|
|
@@ -2302,6 +2458,9 @@ async function _Client_handleUpdate(update) {
|
|
|
2302
2458
|
else if (update instanceof types.UpdateBotInlineSend) {
|
|
2303
2459
|
await __classPrivateFieldGet(this, _Client_handle, "f").call(this, await __classPrivateFieldGet(this, _Client_constructContext, "f").call(this, { chosenInlineResult: await constructChosenInlineResult(update, this[getEntity].bind(this)) }), resolve);
|
|
2304
2460
|
}
|
|
2461
|
+
if (update instanceof types.UpdatePinnedDialogs) {
|
|
2462
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_updatePinnedChats).call(this, update);
|
|
2463
|
+
}
|
|
2305
2464
|
}, _Client_constructReplyMarkup = async function _Client_constructReplyMarkup(params) {
|
|
2306
2465
|
if (params?.replyMarkup) {
|
|
2307
2466
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_assertBot).call(this, "replyMarkup");
|
|
@@ -2318,4 +2477,251 @@ async function _Client_setMyInfo(info) {
|
|
|
2318
2477
|
await this.invoke(new functions.bots.setBotInfo({ bot: new types.InputUserSelf(), ...info }));
|
|
2319
2478
|
}, _Client_getMyInfo = function _Client_getMyInfo(languageCode) {
|
|
2320
2479
|
return this.invoke(new functions.bots.getBotInfo({ bot: new types.InputUserSelf(), lang_code: languageCode ?? "" }));
|
|
2480
|
+
}, _Client_resolveFileId = function _Client_resolveFileId(maybeFileId, expectedFileType) {
|
|
2481
|
+
let fileId = null;
|
|
2482
|
+
try {
|
|
2483
|
+
fileId = FileID.decode(maybeFileId);
|
|
2484
|
+
}
|
|
2485
|
+
catch (err) {
|
|
2486
|
+
d("fileId: %o", err);
|
|
2487
|
+
}
|
|
2488
|
+
if (fileId != null) {
|
|
2489
|
+
if (fileId.fileType != expectedFileType) {
|
|
2490
|
+
UNREACHABLE();
|
|
2491
|
+
}
|
|
2492
|
+
if (fileId.params.mediaId == undefined || fileId.params.accessHash == undefined || fileId.params.fileReference == undefined) {
|
|
2493
|
+
UNREACHABLE();
|
|
2494
|
+
}
|
|
2495
|
+
return {
|
|
2496
|
+
id: fileId.params.mediaId,
|
|
2497
|
+
access_hash: fileId.params.accessHash,
|
|
2498
|
+
file_reference: fileId.params.fileReference,
|
|
2499
|
+
};
|
|
2500
|
+
}
|
|
2501
|
+
return null;
|
|
2502
|
+
}, _Client_sendMedia = async function _Client_sendMedia(chatId, media, params) {
|
|
2503
|
+
const peer = await this.getInputPeer(chatId);
|
|
2504
|
+
const randomId = getRandomId();
|
|
2505
|
+
const silent = params?.disableNotification ? true : undefined;
|
|
2506
|
+
const noforwards = params?.protectContent ? true : undefined;
|
|
2507
|
+
const replyToMsgId = params?.replyToMessageId;
|
|
2508
|
+
const topMsgId = params?.messageThreadId;
|
|
2509
|
+
const sendAs = params?.sendAs ? await this.getInputPeer(params.sendAs) : undefined; // TODO: check default sendAs
|
|
2510
|
+
const replyMarkup = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_constructReplyMarkup).call(this, params);
|
|
2511
|
+
const caption_ = params?.caption;
|
|
2512
|
+
const parseResult = caption_ !== undefined ? __classPrivateFieldGet(this, _Client_instances, "m", _Client_parseText).call(this, caption_, { parseMode: params?.parseMode, entities: params?.captionEntities }) : undefined;
|
|
2513
|
+
const caption = parseResult === undefined ? undefined : parseResult[0];
|
|
2514
|
+
const captionEntities = parseResult === undefined ? undefined : parseResult[1];
|
|
2515
|
+
const result = await this.invoke(new functions.messages.sendMedia({
|
|
2516
|
+
peer,
|
|
2517
|
+
random_id: randomId,
|
|
2518
|
+
silent,
|
|
2519
|
+
noforwards,
|
|
2520
|
+
reply_markup: replyMarkup,
|
|
2521
|
+
reply_to: replyToMsgId !== undefined ? new types.InputReplyToMessage({ reply_to_msg_id: replyToMsgId, top_msg_id: topMsgId }) : undefined,
|
|
2522
|
+
send_as: sendAs,
|
|
2523
|
+
media,
|
|
2524
|
+
message: caption ?? "",
|
|
2525
|
+
entities: captionEntities,
|
|
2526
|
+
}));
|
|
2527
|
+
return await __classPrivateFieldGet(this, _Client_instances, "m", _Client_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
|
|
2528
|
+
}, _Client_sendChatUpdate = async function _Client_sendChatUpdate(chatId, added) {
|
|
2529
|
+
try {
|
|
2530
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_assertUser).call(this, "");
|
|
2531
|
+
}
|
|
2532
|
+
catch {
|
|
2533
|
+
return;
|
|
2534
|
+
}
|
|
2535
|
+
const chat = __classPrivateFieldGet(this, _Client_chats, "f").get(chatId);
|
|
2536
|
+
const update = chat === undefined ? { deletedChat: { chatId } } : added ? { newChat: chat } : { editedChat: chat };
|
|
2537
|
+
__classPrivateFieldGet(this, _Client_handleUpdateQueue, "f").add(async () => {
|
|
2538
|
+
await __classPrivateFieldGet(this, _Client_handle, "f").call(this, await __classPrivateFieldGet(this, _Client_constructContext, "f").call(this, update), resolve);
|
|
2539
|
+
});
|
|
2540
|
+
}, _Client_reassignChatLastMessage = async function _Client_reassignChatLastMessage(chatId, add = false) {
|
|
2541
|
+
try {
|
|
2542
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_assertUser).call(this, "");
|
|
2543
|
+
}
|
|
2544
|
+
catch {
|
|
2545
|
+
return;
|
|
2546
|
+
}
|
|
2547
|
+
const [chat, listId] = __classPrivateFieldGet(this, _Client_instances, "m", _Client_getChatAnywhere).call(this, chatId);
|
|
2548
|
+
if (!chat && !add) {
|
|
2549
|
+
return;
|
|
2550
|
+
}
|
|
2551
|
+
const message_ = await this.storage.getLastMessage(chatId);
|
|
2552
|
+
if (message_ != null) {
|
|
2553
|
+
const message = await constructMessage(message_, this[getEntity].bind(this), this.getMessage.bind(this), this[getStickerSetName].bind(this));
|
|
2554
|
+
if (chat) {
|
|
2555
|
+
chat.order = getChatOrder(message, chat.pinned);
|
|
2556
|
+
chat.lastMessage = message;
|
|
2557
|
+
await this.storage.setChat(listId, chatId, chat.pinned, message.id, message.date);
|
|
2558
|
+
}
|
|
2559
|
+
else {
|
|
2560
|
+
const pinnedChats = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getPinnedChats).call(this, listId);
|
|
2561
|
+
const chat = await constructChat2(chatId, pinnedChats.indexOf(chatId), message, this[getEntity].bind(this));
|
|
2562
|
+
if (chat == null) {
|
|
2563
|
+
UNREACHABLE();
|
|
2564
|
+
}
|
|
2565
|
+
__classPrivateFieldGet(this, _Client_chats, "f").set(chatId, chat);
|
|
2566
|
+
await this.storage.setChat(listId, chatId, chat.pinned, chat.lastMessage?.id ?? 0, chat.lastMessage?.date ?? new Date(0));
|
|
2567
|
+
}
|
|
2568
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_sendChatUpdate).call(this, chatId, !chat);
|
|
2569
|
+
return;
|
|
2570
|
+
}
|
|
2571
|
+
const message = await this.getHistory(chatId, { limit: 1 }).then((v) => v[0]);
|
|
2572
|
+
if (message !== undefined) {
|
|
2573
|
+
if (chat) {
|
|
2574
|
+
chat.order = getChatOrder(message, chat.pinned);
|
|
2575
|
+
chat.lastMessage = message;
|
|
2576
|
+
await this.storage.setChat(listId, chatId, chat.pinned, message.id, message.date);
|
|
2577
|
+
}
|
|
2578
|
+
else {
|
|
2579
|
+
const pinnedChats = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getPinnedChats).call(this, listId);
|
|
2580
|
+
const chat = await constructChat2(chatId, pinnedChats.indexOf(chatId), message, this[getEntity].bind(this));
|
|
2581
|
+
if (chat == null) {
|
|
2582
|
+
UNREACHABLE();
|
|
2583
|
+
}
|
|
2584
|
+
__classPrivateFieldGet(this, _Client_chats, "f").set(chatId, chat);
|
|
2585
|
+
}
|
|
2586
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_sendChatUpdate).call(this, chatId, !chat);
|
|
2587
|
+
return;
|
|
2588
|
+
}
|
|
2589
|
+
if (chat) {
|
|
2590
|
+
chat.order = getChatOrder(undefined, chat.pinned);
|
|
2591
|
+
chat.lastMessage = undefined;
|
|
2592
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_sendChatUpdate).call(this, chatId, false);
|
|
2593
|
+
}
|
|
2594
|
+
}, _Client_getChatAnywhere = function _Client_getChatAnywhere(chatId) {
|
|
2595
|
+
let chat = __classPrivateFieldGet(this, _Client_chats, "f").get(chatId);
|
|
2596
|
+
if (chat) {
|
|
2597
|
+
return [chat, 0];
|
|
2598
|
+
}
|
|
2599
|
+
chat = __classPrivateFieldGet(this, _Client_archivedChats, "f").get(chatId);
|
|
2600
|
+
if (chat) {
|
|
2601
|
+
return [chat, 1];
|
|
2602
|
+
}
|
|
2603
|
+
return [undefined, -1];
|
|
2604
|
+
}, _Client_getChatList = function _Client_getChatList(listId) {
|
|
2605
|
+
switch (listId) {
|
|
2606
|
+
case 0:
|
|
2607
|
+
return __classPrivateFieldGet(this, _Client_chats, "f");
|
|
2608
|
+
case 1:
|
|
2609
|
+
return __classPrivateFieldGet(this, _Client_archivedChats, "f");
|
|
2610
|
+
default:
|
|
2611
|
+
throw new Error("Invalid chat list: " + listId);
|
|
2612
|
+
}
|
|
2613
|
+
}, _Client_loadChatsFromStorage = async function _Client_loadChatsFromStorage() {
|
|
2614
|
+
const chats = await this.storage.getChats(0);
|
|
2615
|
+
const archivedChats = await this.storage.getChats(1);
|
|
2616
|
+
for (const { chatId, pinned, topMessageId } of chats) {
|
|
2617
|
+
const chat = await constructChat3(chatId, pinned, topMessageId, this[getEntity].bind(this), this.getMessage.bind(this));
|
|
2618
|
+
if (chat == null) {
|
|
2619
|
+
continue;
|
|
2620
|
+
}
|
|
2621
|
+
__classPrivateFieldGet(this, _Client_chats, "f").set(chat.id, chat);
|
|
2622
|
+
}
|
|
2623
|
+
for (const { chatId, pinned, topMessageId } of archivedChats) {
|
|
2624
|
+
const chat = await constructChat3(chatId, pinned, topMessageId, this[getEntity].bind(this), this.getMessage.bind(this));
|
|
2625
|
+
if (chat == null) {
|
|
2626
|
+
continue;
|
|
2627
|
+
}
|
|
2628
|
+
__classPrivateFieldGet(this, _Client_archivedChats, "f").set(chat.id, chat);
|
|
2629
|
+
}
|
|
2630
|
+
__classPrivateFieldSet(this, _Client_chatsLoadedFromStorage, true, "f");
|
|
2631
|
+
}, _Client_getLoadedChats = function _Client_getLoadedChats(listId) {
|
|
2632
|
+
const chats_ = __classPrivateFieldGet(this, _Client_instances, "m", _Client_getChatList).call(this, listId);
|
|
2633
|
+
const chats = new Array();
|
|
2634
|
+
for (const chat of chats_.values()) {
|
|
2635
|
+
chats.push(chat);
|
|
2636
|
+
}
|
|
2637
|
+
return chats
|
|
2638
|
+
.sort((a, b) => b.id - a.id)
|
|
2639
|
+
.sort((a, b) => b.order.localeCompare(a.order));
|
|
2640
|
+
}, _Client_loadPinnedChats = async function _Client_loadPinnedChats() {
|
|
2641
|
+
const [pinnedChats, pinnedArchiveChats] = await Promise.all([this.storage.getPinnedChats(0), this.storage.getPinnedChats(1)]);
|
|
2642
|
+
if (pinnedChats != null && pinnedArchiveChats != null) {
|
|
2643
|
+
__classPrivateFieldSet(this, _Client_pinnedChats, pinnedChats, "f");
|
|
2644
|
+
__classPrivateFieldSet(this, _Client_pinnedArchiveChats, pinnedArchiveChats, "f");
|
|
2645
|
+
__classPrivateFieldSet(this, _Client_storageHadPinnedChats, true, "f");
|
|
2646
|
+
}
|
|
2647
|
+
__classPrivateFieldSet(this, _Client_pinnedChatsLoaded, true, "f");
|
|
2648
|
+
}, _Client_fetchPinnedChats = async function _Client_fetchPinnedChats(listId = null) {
|
|
2649
|
+
if (listId == null || listId == 0) {
|
|
2650
|
+
const dialogs = await this.api.messages.getPinnedDialogs({ folder_id: 0 });
|
|
2651
|
+
const pinnedChats = new Array();
|
|
2652
|
+
for (const dialog of dialogs.dialogs) {
|
|
2653
|
+
pinnedChats.push(peerToChatId(dialog.peer));
|
|
2654
|
+
}
|
|
2655
|
+
__classPrivateFieldSet(this, _Client_pinnedChats, pinnedChats, "f");
|
|
2656
|
+
await this.storage.setPinnedChats(0, __classPrivateFieldGet(this, _Client_pinnedChats, "f"));
|
|
2657
|
+
}
|
|
2658
|
+
if (listId == null || listId == 1) {
|
|
2659
|
+
const dialogs = await this.api.messages.getPinnedDialogs({ folder_id: 1 });
|
|
2660
|
+
const pinnedArchiveChats = new Array();
|
|
2661
|
+
for (const dialog of dialogs.dialogs) {
|
|
2662
|
+
pinnedArchiveChats.push(peerToChatId(dialog.peer));
|
|
2663
|
+
}
|
|
2664
|
+
__classPrivateFieldSet(this, _Client_pinnedArchiveChats, pinnedArchiveChats, "f");
|
|
2665
|
+
await this.storage.setPinnedChats(1, __classPrivateFieldGet(this, _Client_pinnedArchiveChats, "f"));
|
|
2666
|
+
}
|
|
2667
|
+
if (listId != null && listId != 0 && listId != 1) {
|
|
2668
|
+
UNREACHABLE();
|
|
2669
|
+
}
|
|
2670
|
+
}, _Client_getPinnedChats = async function _Client_getPinnedChats(listId) {
|
|
2671
|
+
if (!__classPrivateFieldGet(this, _Client_pinnedChatsLoaded, "f")) {
|
|
2672
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_loadPinnedChats).call(this);
|
|
2673
|
+
}
|
|
2674
|
+
if (!__classPrivateFieldGet(this, _Client_storageHadPinnedChats, "f")) {
|
|
2675
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_fetchPinnedChats).call(this);
|
|
2676
|
+
}
|
|
2677
|
+
switch (listId) {
|
|
2678
|
+
case 0:
|
|
2679
|
+
return __classPrivateFieldGet(this, _Client_pinnedChats, "f");
|
|
2680
|
+
case 1:
|
|
2681
|
+
return __classPrivateFieldGet(this, _Client_pinnedArchiveChats, "f");
|
|
2682
|
+
default:
|
|
2683
|
+
UNREACHABLE();
|
|
2684
|
+
}
|
|
2685
|
+
}, _Client_updatePinnedChats = async function _Client_updatePinnedChats(update) {
|
|
2686
|
+
const listId = update.folder_id ?? 0;
|
|
2687
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_fetchPinnedChats).call(this, update.folder_id);
|
|
2688
|
+
const chats = __classPrivateFieldGet(this, _Client_instances, "m", _Client_getChatList).call(this, listId);
|
|
2689
|
+
const pinnedChats = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getPinnedChats).call(this, listId);
|
|
2690
|
+
for (const [i, chatId] of pinnedChats.entries()) {
|
|
2691
|
+
const chat = chats.get(chatId);
|
|
2692
|
+
if (chat !== undefined) {
|
|
2693
|
+
chat.order = getChatOrder(chat.lastMessage, i);
|
|
2694
|
+
chat.pinned = i;
|
|
2695
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_sendChatUpdate).call(this, chatId, false);
|
|
2696
|
+
}
|
|
2697
|
+
}
|
|
2698
|
+
for (const chat of chats.values()) {
|
|
2699
|
+
if (chat.pinned != -1 && pinnedChats.indexOf(chat.id) == -1) {
|
|
2700
|
+
chat.order = getChatOrder(chat.lastMessage, -1);
|
|
2701
|
+
chat.pinned = -1;
|
|
2702
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_sendChatUpdate).call(this, chat.id, false);
|
|
2703
|
+
}
|
|
2704
|
+
}
|
|
2705
|
+
}, _Client_fetchChats = async function _Client_fetchChats(listId, limit, after) {
|
|
2706
|
+
const dialogs = await this.api.messages.getDialogs({
|
|
2707
|
+
limit,
|
|
2708
|
+
offset_id: after?.lastMessage?.id ?? 0,
|
|
2709
|
+
offset_date: after?.lastMessage?.date ? Math.ceil(after.lastMessage.date.getTime() / 1000) : 0,
|
|
2710
|
+
offset_peer: after ? await this.getInputPeer(after.id) : new types.InputPeerEmpty(),
|
|
2711
|
+
hash: 0n,
|
|
2712
|
+
folder_id: listId,
|
|
2713
|
+
});
|
|
2714
|
+
const pinnedChats = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getPinnedChats).call(this, listId);
|
|
2715
|
+
if (!(dialogs instanceof types.messages.Dialogs) && !(dialogs instanceof types.messages.DialogsSlice)) {
|
|
2716
|
+
UNREACHABLE();
|
|
2717
|
+
}
|
|
2718
|
+
if (dialogs.dialogs.length == 0) {
|
|
2719
|
+
await this.storage.setHasAllChats(listId, true);
|
|
2720
|
+
}
|
|
2721
|
+
const chats = __classPrivateFieldGet(this, _Client_instances, "m", _Client_getChatList).call(this, listId);
|
|
2722
|
+
for (const dialog of dialogs.dialogs) {
|
|
2723
|
+
const chat = await constructChat(dialog, dialogs, pinnedChats, this[getEntity].bind(this), this.getMessage.bind(this), this[getStickerSetName].bind(this));
|
|
2724
|
+
chats.set(chat.id, chat);
|
|
2725
|
+
await this.storage.setChat(listId, chat.id, chat.pinned, chat.lastMessage?.id ?? 0, chat.lastMessage?.date ?? new Date(0));
|
|
2726
|
+
}
|
|
2321
2727
|
};
|