@mtkruto/node 0.62.1 → 0.63.0
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/2_tl.d.ts +6 -6
- package/esm/2_tl.d.ts.map +1 -1
- package/esm/2_tl.js +6 -6
- package/esm/3_errors.d.ts +1 -2
- package/esm/3_errors.d.ts.map +1 -1
- package/esm/3_errors.js +2 -1
- package/esm/4_constants.d.ts +0 -1
- package/esm/4_constants.d.ts.map +1 -1
- package/esm/4_constants.js +0 -1
- package/esm/4_errors.d.ts +2 -2
- package/esm/4_errors.d.ts.map +1 -1
- package/esm/4_session.d.ts +24 -0
- package/esm/4_session.d.ts.map +1 -0
- package/esm/4_session.js +23 -0
- package/esm/5_client.d.ts +1 -1
- package/esm/5_client.js +1 -1
- package/esm/client/0_client_abstract.d.ts +28 -26
- package/esm/client/0_client_abstract.d.ts.map +1 -1
- package/esm/client/0_client_abstract.js +16 -88
- package/esm/client/0_params.d.ts +5 -0
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/0_password.d.ts.map +1 -1
- package/esm/client/0_password.js +2 -2
- package/esm/client/0_storage_operations.d.ts +4 -4
- package/esm/client/0_storage_operations.d.ts.map +1 -1
- package/esm/client/0_storage_operations.js +14 -14
- package/esm/client/0_update_processor.d.ts +19 -0
- package/esm/client/0_update_processor.d.ts.map +1 -1
- package/esm/client/0_update_processor.js +19 -0
- package/esm/client/0_utilities.d.ts +6 -2
- package/esm/client/0_utilities.d.ts.map +1 -1
- package/esm/client/0_utilities.js +21 -23
- package/esm/client/1_client_plain.d.ts +9 -6
- package/esm/client/1_client_plain.d.ts.map +1 -1
- package/esm/client/1_client_plain.js +26 -41
- package/esm/client/1_types.d.ts +4 -23
- package/esm/client/1_types.d.ts.map +1 -1
- package/esm/client/2_account_manager.js +10 -10
- package/esm/client/2_business_connection_manager.d.ts.map +1 -1
- package/esm/client/2_business_connection_manager.js +4 -4
- package/esm/client/2_client_encrypted.d.ts +58 -0
- package/esm/client/2_client_encrypted.d.ts.map +1 -0
- package/esm/client/2_client_encrypted.js +265 -0
- package/esm/client/2_file_manager.d.ts.map +1 -1
- package/esm/client/2_file_manager.js +54 -74
- package/esm/client/2_network_statistics_manager.d.ts +1 -1
- package/esm/client/2_network_statistics_manager.d.ts.map +1 -1
- package/esm/client/2_network_statistics_manager.js +3 -3
- package/esm/client/2_payment_manager.d.ts.map +1 -1
- package/esm/client/2_payment_manager.js +3 -3
- package/esm/client/2_reaction_manager.d.ts.map +1 -1
- package/esm/client/2_reaction_manager.js +10 -10
- package/esm/client/2_translations_manager.d.ts +19 -0
- package/esm/client/2_translations_manager.d.ts.map +1 -1
- package/esm/client/2_translations_manager.js +24 -5
- package/esm/client/2_update_manager.d.ts +4 -4
- package/esm/client/2_update_manager.d.ts.map +1 -1
- package/esm/client/2_update_manager.js +69 -79
- package/esm/client/3_client_encrypted_pool.d.ts +30 -0
- package/esm/client/3_client_encrypted_pool.d.ts.map +1 -0
- package/esm/client/3_client_encrypted_pool.js +70 -0
- package/esm/client/3_message_manager.d.ts.map +1 -1
- package/esm/client/3_message_manager.js +96 -70
- package/esm/client/3_video_chat_manager.d.ts.map +1 -1
- package/esm/client/3_video_chat_manager.js +15 -20
- package/esm/client/4_callback_query_manager.d.ts.map +1 -1
- package/esm/client/4_callback_query_manager.js +2 -2
- package/esm/client/4_chat_list_manager.d.ts.map +1 -1
- package/esm/client/4_chat_list_manager.js +33 -33
- package/esm/client/4_chat_manager.d.ts.map +1 -1
- package/esm/client/4_chat_manager.js +25 -25
- package/esm/client/4_gift_manager.js +2 -2
- package/esm/client/4_inline_query_manager.d.ts.map +1 -1
- package/esm/client/4_inline_query_manager.js +4 -4
- package/esm/client/4_poll_manager.d.ts.map +1 -1
- package/esm/client/4_poll_manager.js +5 -5
- package/esm/client/4_story_manager.d.ts.map +1 -1
- package/esm/client/4_story_manager.js +10 -10
- package/esm/client/5_client.d.ts +3 -9
- package/esm/client/5_client.d.ts.map +1 -1
- package/esm/client/5_client.js +290 -306
- package/esm/connection/0_connection.d.ts +5 -4
- package/esm/connection/0_connection.d.ts.map +1 -1
- package/esm/connection/1_connection_web_socket.js +2 -2
- package/esm/mod.d.ts +1 -1
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +1 -1
- package/{script/tl/2_tl_reader.d.ts → esm/session/0_session_error.d.ts} +4 -7
- package/esm/session/0_session_error.d.ts.map +1 -0
- package/esm/{tl/2_tl_reader.d.ts → session/0_session_error.js} +5 -7
- package/esm/{tl/2_tl_writer.d.ts → session/0_session_state.d.ts} +7 -5
- package/esm/session/0_session_state.d.ts.map +1 -0
- package/esm/session/0_session_state.js +77 -0
- package/esm/session/1_session.d.ts +31 -0
- package/esm/session/1_session.d.ts.map +1 -0
- package/esm/session/1_session.js +149 -0
- package/esm/session/2_session_encrypted.d.ts +40 -0
- package/esm/session/2_session_encrypted.d.ts.map +1 -0
- package/esm/session/2_session_encrypted.js +416 -0
- package/esm/session/2_session_plain.d.ts +25 -0
- package/esm/session/2_session_plain.d.ts.map +1 -0
- package/esm/session/2_session_plain.js +56 -0
- package/esm/tl/0_tl_error.d.ts +22 -0
- package/esm/tl/0_tl_error.d.ts.map +1 -0
- package/esm/tl/0_tl_error.js +21 -0
- package/esm/tl/0_types.d.ts +25 -0
- package/esm/tl/0_types.d.ts.map +1 -0
- package/esm/tl/0_types.js +20 -0
- package/esm/tl/0_utilities.d.ts +32 -0
- package/esm/tl/0_utilities.d.ts.map +1 -0
- package/esm/tl/0_utilities.js +51 -0
- package/esm/tl/0_utilities_test.d.ts.map +1 -0
- package/esm/tl/1_mtproto_api.d.ts +371 -0
- package/esm/tl/1_mtproto_api.d.ts.map +1 -0
- package/esm/tl/1_mtproto_api.js +416 -0
- package/esm/tl/{0_api.d.ts → 1_telegram_api.d.ts} +23 -340
- package/esm/tl/1_telegram_api.d.ts.map +1 -0
- package/esm/tl/{0_api.js → 1_telegram_api.js} +4945 -11109
- package/{script/tl/0_tl_raw_reader.d.ts → esm/tl/1_tl_reader.d.ts} +5 -2
- package/esm/tl/1_tl_reader.d.ts.map +1 -0
- package/esm/tl/{2_tl_reader.js → 1_tl_reader.js} +107 -40
- package/esm/tl/1_tl_reader_test.d.ts.map +1 -0
- package/esm/tl/{0_tl_raw_writer.d.ts → 1_tl_writer.d.ts} +5 -2
- package/esm/tl/1_tl_writer.d.ts.map +1 -0
- package/esm/tl/{2_tl_writer.js → 1_tl_writer.js} +80 -23
- package/esm/tl/1_tl_writer_test.d.ts.map +1 -0
- package/esm/tl/1_utilities.d.ts +9 -24
- package/esm/tl/1_utilities.d.ts.map +1 -1
- package/esm/tl/1_utilities.js +18 -64
- package/esm/tl/2_message.d.ts +2 -2
- package/esm/tl/2_message.d.ts.map +1 -1
- package/esm/tl/2_message.js +7 -7
- package/esm/tl/2_mtproto.d.ts +33 -0
- package/esm/tl/2_mtproto.d.ts.map +1 -0
- package/esm/tl/2_mtproto.js +53 -0
- package/{script/tl/2_utilities.d.ts → esm/tl/2_telegram.d.ts} +16 -2
- package/esm/tl/2_telegram.d.ts.map +1 -0
- package/esm/tl/{2_utilities.js → 2_telegram.js} +46 -1
- package/esm/transport/0_transport.d.ts +1 -1
- package/esm/transport/0_transport.d.ts.map +1 -1
- package/esm/types/0_chat_photo.d.ts.map +1 -1
- package/esm/types/0_chat_photo.js +2 -2
- package/esm/types/0_giveaway_parameters.d.ts.map +1 -1
- package/esm/types/0_giveaway_parameters.js +3 -3
- package/esm/types/0_location.d.ts.map +1 -1
- package/esm/types/0_location.js +5 -5
- package/esm/types/0_message_entity.d.ts.map +1 -1
- package/esm/types/0_message_entity.js +20 -20
- package/esm/types/0_reaction.d.ts.map +1 -1
- package/esm/types/0_reaction.js +4 -4
- package/esm/types/0_slow_mode_duration.d.ts +19 -0
- package/esm/types/0_slow_mode_duration.d.ts.map +1 -1
- package/esm/types/0_slow_mode_duration.js +19 -0
- package/esm/types/0_thumbnail.d.ts.map +1 -1
- package/esm/types/0_thumbnail.js +3 -3
- package/esm/types/0_translation.d.ts +19 -0
- package/esm/types/0_translation.d.ts.map +1 -1
- package/esm/types/0_translation.js +22 -3
- package/esm/types/0_video_chat.d.ts.map +1 -1
- package/esm/types/0_video_chat.js +2 -2
- package/esm/types/1_animation.d.ts.map +1 -1
- package/esm/types/1_animation.js +2 -2
- package/esm/types/1_audio.d.ts.map +1 -1
- package/esm/types/1_audio.js +2 -2
- package/esm/types/1_bot_command_scope.d.ts.map +1 -1
- package/esm/types/1_bot_command_scope.js +2 -2
- package/esm/types/1_chat_p.d.ts.map +1 -1
- package/esm/types/1_chat_p.js +6 -6
- package/esm/types/1_document.d.ts.map +1 -1
- package/esm/types/1_document.js +2 -2
- package/esm/types/1_keyboard_button.d.ts.map +1 -1
- package/esm/types/1_keyboard_button.js +10 -10
- package/esm/types/1_message_reaction.d.ts.map +1 -1
- package/esm/types/1_message_reaction.js +6 -6
- package/esm/types/1_photo.d.ts.map +1 -1
- package/esm/types/1_photo.js +3 -3
- package/esm/types/1_sticker.d.ts.map +1 -1
- package/esm/types/1_sticker.js +8 -8
- package/esm/types/1_story_privacy.d.ts.map +1 -1
- package/esm/types/1_story_privacy.js +7 -7
- package/esm/types/1_user.d.ts.map +1 -1
- package/esm/types/1_user.js +2 -2
- package/esm/types/1_venue.d.ts.map +1 -1
- package/esm/types/1_venue.js +2 -2
- package/esm/types/1_video.d.ts.map +1 -1
- package/esm/types/1_video.js +2 -2
- package/esm/types/1_video_note.d.ts.map +1 -1
- package/esm/types/1_video_note.js +2 -2
- package/esm/types/2_chat.d.ts.map +1 -1
- package/esm/types/2_chat.js +8 -8
- package/esm/types/2_chat_member.d.ts.map +1 -1
- package/esm/types/2_chat_member.js +10 -10
- package/esm/types/2_chat_settings.d.ts +19 -0
- package/esm/types/2_chat_settings.d.ts.map +1 -1
- package/esm/types/2_chat_settings.js +21 -2
- package/esm/types/2_chosen_inline_result.d.ts.map +1 -1
- package/esm/types/2_chosen_inline_result.js +4 -4
- package/esm/types/2_game.d.ts.map +1 -1
- package/esm/types/2_game.js +4 -4
- package/esm/types/2_gift_upgraded_component.d.ts.map +1 -1
- package/esm/types/2_gift_upgraded_component.js +3 -3
- package/esm/types/2_inactive_chat.d.ts.map +1 -1
- package/esm/types/2_inactive_chat.js +2 -2
- package/esm/types/2_inline_keyboard_button.d.ts.map +1 -1
- package/esm/types/2_inline_keyboard_button.js +10 -10
- package/esm/types/2_inline_query.d.ts.map +1 -1
- package/esm/types/2_inline_query.js +7 -7
- package/esm/types/2_message_reactions.d.ts.map +1 -1
- package/esm/types/2_message_reactions.js +2 -2
- package/esm/types/2_story_content.d.ts.map +1 -1
- package/esm/types/2_story_content.js +6 -6
- package/esm/types/2_story_interactive_area.d.ts.map +1 -1
- package/esm/types/2_story_interactive_area.js +9 -9
- package/esm/types/3_chat_member_updated.d.ts.map +1 -1
- package/esm/types/3_chat_member_updated.js +2 -2
- package/esm/types/3_gift.d.ts.map +1 -1
- package/esm/types/3_gift.js +3 -3
- package/esm/types/3_join_request.d.ts.map +1 -1
- package/esm/types/3_join_request.js +2 -2
- package/esm/types/3_reply_markup.d.ts.map +1 -1
- package/esm/types/3_reply_markup.js +5 -5
- package/esm/types/4_claimed_gift.d.ts.map +1 -1
- package/esm/types/4_claimed_gift.js +2 -2
- package/esm/types/4_inline_query_result.d.ts.map +1 -1
- package/esm/types/4_inline_query_result.js +14 -14
- package/esm/types/4_message.d.ts.map +1 -1
- package/esm/types/4_message.js +57 -57
- package/esm/types/5_callback_query.d.ts.map +1 -1
- package/esm/types/5_callback_query.js +6 -7
- package/esm/types/5_chat_list_item.d.ts.map +1 -1
- package/esm/types/5_chat_list_item.js +5 -5
- package/esm/types/5_claimed_gifts.d.ts.map +1 -1
- package/esm/types/5_claimed_gifts.js +6 -6
- package/esm/types/_file_id.d.ts.map +1 -1
- package/esm/types/_file_id.js +3 -3
- package/package.json +1 -1
- package/script/2_tl.d.ts +6 -6
- package/script/2_tl.d.ts.map +1 -1
- package/script/2_tl.js +11 -11
- package/script/3_errors.d.ts +1 -2
- package/script/3_errors.d.ts.map +1 -1
- package/script/3_errors.js +2 -1
- package/script/4_constants.d.ts +0 -1
- package/script/4_constants.d.ts.map +1 -1
- package/script/4_constants.js +1 -2
- package/script/4_errors.d.ts +2 -2
- package/script/4_errors.d.ts.map +1 -1
- package/script/4_session.d.ts +24 -0
- package/script/4_session.d.ts.map +1 -0
- package/script/4_session.js +39 -0
- package/script/5_client.d.ts +1 -1
- package/script/5_client.js +1 -1
- package/script/client/0_client_abstract.d.ts +28 -26
- package/script/client/0_client_abstract.d.ts.map +1 -1
- package/script/client/0_client_abstract.js +18 -113
- package/script/client/0_params.d.ts +5 -0
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/0_password.d.ts.map +1 -1
- package/script/client/0_password.js +1 -1
- package/script/client/0_storage_operations.d.ts +4 -4
- package/script/client/0_storage_operations.d.ts.map +1 -1
- package/script/client/0_storage_operations.js +13 -13
- package/script/client/0_update_processor.d.ts +19 -0
- package/script/client/0_update_processor.d.ts.map +1 -1
- package/script/client/0_update_processor.js +19 -0
- package/script/client/0_utilities.d.ts +6 -2
- package/script/client/0_utilities.d.ts.map +1 -1
- package/script/client/0_utilities.js +22 -24
- package/script/client/1_client_plain.d.ts +9 -6
- package/script/client/1_client_plain.d.ts.map +1 -1
- package/script/client/1_client_plain.js +25 -40
- package/script/client/1_types.d.ts +4 -23
- package/script/client/1_types.d.ts.map +1 -1
- package/script/client/2_account_manager.js +9 -9
- package/script/client/2_business_connection_manager.d.ts.map +1 -1
- package/script/client/2_business_connection_manager.js +3 -3
- package/script/client/2_client_encrypted.d.ts +58 -0
- package/script/client/2_client_encrypted.d.ts.map +1 -0
- package/script/client/2_client_encrypted.js +269 -0
- package/script/client/2_file_manager.d.ts.map +1 -1
- package/script/client/2_file_manager.js +52 -72
- package/script/client/2_network_statistics_manager.d.ts +1 -1
- package/script/client/2_network_statistics_manager.d.ts.map +1 -1
- package/script/client/2_network_statistics_manager.js +3 -3
- package/script/client/2_payment_manager.d.ts.map +1 -1
- package/script/client/2_payment_manager.js +2 -2
- package/script/client/2_reaction_manager.d.ts.map +1 -1
- package/script/client/2_reaction_manager.js +9 -9
- package/script/client/2_translations_manager.d.ts +19 -0
- package/script/client/2_translations_manager.d.ts.map +1 -1
- package/script/client/2_translations_manager.js +23 -4
- package/script/client/2_update_manager.d.ts +4 -4
- package/script/client/2_update_manager.d.ts.map +1 -1
- package/script/client/2_update_manager.js +68 -78
- package/script/client/3_client_encrypted_pool.d.ts +30 -0
- package/script/client/3_client_encrypted_pool.d.ts.map +1 -0
- package/script/client/3_client_encrypted_pool.js +74 -0
- package/script/client/3_message_manager.d.ts.map +1 -1
- package/script/client/3_message_manager.js +95 -69
- package/script/client/3_video_chat_manager.d.ts.map +1 -1
- package/script/client/3_video_chat_manager.js +14 -19
- package/script/client/4_callback_query_manager.d.ts.map +1 -1
- package/script/client/4_callback_query_manager.js +1 -1
- package/script/client/4_chat_list_manager.d.ts.map +1 -1
- package/script/client/4_chat_list_manager.js +32 -32
- package/script/client/4_chat_manager.d.ts.map +1 -1
- package/script/client/4_chat_manager.js +24 -24
- package/script/client/4_gift_manager.js +1 -1
- package/script/client/4_inline_query_manager.d.ts.map +1 -1
- package/script/client/4_inline_query_manager.js +3 -3
- package/script/client/4_poll_manager.d.ts.map +1 -1
- package/script/client/4_poll_manager.js +4 -4
- package/script/client/4_story_manager.d.ts.map +1 -1
- package/script/client/4_story_manager.js +9 -9
- package/script/client/5_client.d.ts +3 -9
- package/script/client/5_client.d.ts.map +1 -1
- package/script/client/5_client.js +284 -300
- package/script/connection/0_connection.d.ts +5 -4
- package/script/connection/0_connection.d.ts.map +1 -1
- package/script/connection/1_connection_web_socket.js +2 -2
- package/script/mod.d.ts +1 -1
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +1 -2
- package/script/session/0_session_error.d.ts +24 -0
- package/script/session/0_session_error.d.ts.map +1 -0
- package/script/session/0_session_error.js +29 -0
- package/script/{tl/2_tl_writer.d.ts → session/0_session_state.d.ts} +7 -5
- package/script/session/0_session_state.d.ts.map +1 -0
- package/script/session/0_session_state.js +81 -0
- package/script/session/1_session.d.ts +31 -0
- package/script/session/1_session.d.ts.map +1 -0
- package/script/session/1_session.js +176 -0
- package/script/session/2_session_encrypted.d.ts +40 -0
- package/script/session/2_session_encrypted.d.ts.map +1 -0
- package/script/session/2_session_encrypted.js +420 -0
- package/script/session/2_session_plain.d.ts +25 -0
- package/script/session/2_session_plain.d.ts.map +1 -0
- package/script/session/2_session_plain.js +60 -0
- package/script/tl/0_tl_error.d.ts +22 -0
- package/script/tl/0_tl_error.d.ts.map +1 -0
- package/script/tl/0_tl_error.js +25 -0
- package/script/tl/0_types.d.ts +25 -0
- package/script/tl/0_types.d.ts.map +1 -0
- package/script/tl/0_types.js +21 -0
- package/script/tl/0_utilities.d.ts +32 -0
- package/script/tl/0_utilities.d.ts.map +1 -0
- package/script/tl/0_utilities.js +59 -0
- package/script/tl/0_utilities_test.d.ts.map +1 -0
- package/script/tl/1_mtproto_api.d.ts +371 -0
- package/script/tl/1_mtproto_api.d.ts.map +1 -0
- package/script/tl/1_mtproto_api.js +419 -0
- package/script/tl/{0_api.d.ts → 1_telegram_api.d.ts} +23 -340
- package/script/tl/1_telegram_api.d.ts.map +1 -0
- package/script/tl/{0_api.js → 1_telegram_api.js} +4947 -11134
- package/{esm/tl/0_tl_raw_reader.d.ts → script/tl/1_tl_reader.d.ts} +5 -2
- package/script/tl/1_tl_reader.d.ts.map +1 -0
- package/script/tl/1_tl_reader.js +218 -0
- package/script/tl/1_tl_reader_test.d.ts.map +1 -0
- package/script/tl/{0_tl_raw_writer.d.ts → 1_tl_writer.d.ts} +5 -2
- package/script/tl/1_tl_writer.d.ts.map +1 -0
- package/script/tl/{2_tl_writer.js → 1_tl_writer.js} +102 -45
- package/script/tl/1_tl_writer_test.d.ts.map +1 -0
- package/script/tl/1_utilities.d.ts +9 -24
- package/script/tl/1_utilities.d.ts.map +1 -1
- package/script/tl/1_utilities.js +19 -72
- package/script/tl/2_message.d.ts +2 -2
- package/script/tl/2_message.d.ts.map +1 -1
- package/script/tl/2_message.js +7 -7
- package/script/tl/2_mtproto.d.ts +33 -0
- package/script/tl/2_mtproto.d.ts.map +1 -0
- package/script/tl/2_mtproto.js +78 -0
- package/{esm/tl/2_utilities.d.ts → script/tl/2_telegram.d.ts} +16 -2
- package/script/tl/2_telegram.d.ts.map +1 -0
- package/script/tl/2_telegram.js +167 -0
- package/script/transport/0_transport.d.ts +1 -1
- package/script/transport/0_transport.d.ts.map +1 -1
- package/script/types/0_chat_photo.d.ts.map +1 -1
- package/script/types/0_chat_photo.js +1 -1
- package/script/types/0_giveaway_parameters.d.ts.map +1 -1
- package/script/types/0_giveaway_parameters.js +2 -2
- package/script/types/0_location.d.ts.map +1 -1
- package/script/types/0_location.js +4 -4
- package/script/types/0_message_entity.d.ts.map +1 -1
- package/script/types/0_message_entity.js +19 -19
- package/script/types/0_reaction.d.ts.map +1 -1
- package/script/types/0_reaction.js +3 -3
- package/script/types/0_slow_mode_duration.d.ts +19 -0
- package/script/types/0_slow_mode_duration.d.ts.map +1 -1
- package/script/types/0_slow_mode_duration.js +19 -0
- package/script/types/0_thumbnail.d.ts.map +1 -1
- package/script/types/0_thumbnail.js +2 -2
- package/script/types/0_translation.d.ts +19 -0
- package/script/types/0_translation.d.ts.map +1 -1
- package/script/types/0_translation.js +21 -2
- package/script/types/0_video_chat.d.ts.map +1 -1
- package/script/types/0_video_chat.js +1 -1
- package/script/types/1_animation.d.ts.map +1 -1
- package/script/types/1_animation.js +1 -1
- package/script/types/1_audio.d.ts.map +1 -1
- package/script/types/1_audio.js +1 -1
- package/script/types/1_bot_command_scope.d.ts.map +1 -1
- package/script/types/1_bot_command_scope.js +1 -1
- package/script/types/1_chat_p.d.ts.map +1 -1
- package/script/types/1_chat_p.js +5 -5
- package/script/types/1_document.d.ts.map +1 -1
- package/script/types/1_document.js +1 -1
- package/script/types/1_keyboard_button.d.ts.map +1 -1
- package/script/types/1_keyboard_button.js +9 -9
- package/script/types/1_message_reaction.d.ts.map +1 -1
- package/script/types/1_message_reaction.js +5 -5
- package/script/types/1_photo.d.ts.map +1 -1
- package/script/types/1_photo.js +2 -2
- package/script/types/1_sticker.d.ts.map +1 -1
- package/script/types/1_sticker.js +7 -7
- package/script/types/1_story_privacy.d.ts.map +1 -1
- package/script/types/1_story_privacy.js +6 -6
- package/script/types/1_user.d.ts.map +1 -1
- package/script/types/1_user.js +1 -1
- package/script/types/1_venue.d.ts.map +1 -1
- package/script/types/1_venue.js +1 -1
- package/script/types/1_video.d.ts.map +1 -1
- package/script/types/1_video.js +1 -1
- package/script/types/1_video_note.d.ts.map +1 -1
- package/script/types/1_video_note.js +1 -1
- package/script/types/2_chat.d.ts.map +1 -1
- package/script/types/2_chat.js +7 -7
- package/script/types/2_chat_member.d.ts.map +1 -1
- package/script/types/2_chat_member.js +9 -9
- package/script/types/2_chat_settings.d.ts +19 -0
- package/script/types/2_chat_settings.d.ts.map +1 -1
- package/script/types/2_chat_settings.js +20 -1
- package/script/types/2_chosen_inline_result.d.ts.map +1 -1
- package/script/types/2_chosen_inline_result.js +3 -3
- package/script/types/2_game.d.ts.map +1 -1
- package/script/types/2_game.js +3 -3
- package/script/types/2_gift_upgraded_component.d.ts.map +1 -1
- package/script/types/2_gift_upgraded_component.js +2 -2
- package/script/types/2_inactive_chat.d.ts.map +1 -1
- package/script/types/2_inactive_chat.js +1 -1
- package/script/types/2_inline_keyboard_button.d.ts.map +1 -1
- package/script/types/2_inline_keyboard_button.js +9 -9
- package/script/types/2_inline_query.d.ts.map +1 -1
- package/script/types/2_inline_query.js +6 -6
- package/script/types/2_message_reactions.d.ts.map +1 -1
- package/script/types/2_message_reactions.js +1 -1
- package/script/types/2_story_content.d.ts.map +1 -1
- package/script/types/2_story_content.js +5 -5
- package/script/types/2_story_interactive_area.d.ts.map +1 -1
- package/script/types/2_story_interactive_area.js +8 -8
- package/script/types/3_chat_member_updated.d.ts.map +1 -1
- package/script/types/3_chat_member_updated.js +1 -1
- package/script/types/3_gift.d.ts.map +1 -1
- package/script/types/3_gift.js +2 -2
- package/script/types/3_join_request.d.ts.map +1 -1
- package/script/types/3_join_request.js +1 -1
- package/script/types/3_reply_markup.d.ts.map +1 -1
- package/script/types/3_reply_markup.js +4 -4
- package/script/types/4_claimed_gift.d.ts.map +1 -1
- package/script/types/4_claimed_gift.js +1 -1
- package/script/types/4_inline_query_result.d.ts.map +1 -1
- package/script/types/4_inline_query_result.js +13 -13
- package/script/types/4_message.d.ts.map +1 -1
- package/script/types/4_message.js +56 -56
- package/script/types/5_callback_query.d.ts.map +1 -1
- package/script/types/5_callback_query.js +5 -6
- package/script/types/5_chat_list_item.d.ts.map +1 -1
- package/script/types/5_chat_list_item.js +4 -4
- package/script/types/5_claimed_gifts.d.ts.map +1 -1
- package/script/types/5_claimed_gifts.js +5 -5
- package/script/types/_file_id.d.ts.map +1 -1
- package/script/types/_file_id.js +2 -2
- package/esm/client/0_message.d.ts +0 -29
- package/esm/client/0_message.d.ts.map +0 -1
- package/esm/client/0_message.js +0 -83
- package/esm/client/1_client_encrypted.d.ts +0 -52
- package/esm/client/1_client_encrypted.d.ts.map +0 -1
- package/esm/client/1_client_encrypted.js +0 -381
- package/esm/tl/0_api.d.ts.map +0 -1
- package/esm/tl/0_tl_raw_reader.d.ts.map +0 -1
- package/esm/tl/0_tl_raw_reader.js +0 -97
- package/esm/tl/0_tl_raw_reader_test.d.ts.map +0 -1
- package/esm/tl/0_tl_raw_writer.d.ts.map +0 -1
- package/esm/tl/0_tl_raw_writer.js +0 -86
- package/esm/tl/0_tl_raw_writer_test.d.ts.map +0 -1
- package/esm/tl/1_utilities_test.d.ts.map +0 -1
- package/esm/tl/2_tl_reader.d.ts.map +0 -1
- package/esm/tl/2_tl_reader_test.d.ts.map +0 -1
- package/esm/tl/2_tl_writer.d.ts.map +0 -1
- package/esm/tl/2_tl_writer_test.d.ts.map +0 -1
- package/esm/tl/2_utilities.d.ts.map +0 -1
- package/script/client/0_message.d.ts +0 -29
- package/script/client/0_message.d.ts.map +0 -1
- package/script/client/0_message.js +0 -90
- package/script/client/1_client_encrypted.d.ts +0 -52
- package/script/client/1_client_encrypted.d.ts.map +0 -1
- package/script/client/1_client_encrypted.js +0 -385
- package/script/tl/0_api.d.ts.map +0 -1
- package/script/tl/0_tl_raw_reader.d.ts.map +0 -1
- package/script/tl/0_tl_raw_reader.js +0 -102
- package/script/tl/0_tl_raw_reader_test.d.ts.map +0 -1
- package/script/tl/0_tl_raw_writer.d.ts.map +0 -1
- package/script/tl/0_tl_raw_writer.js +0 -90
- package/script/tl/0_tl_raw_writer_test.d.ts.map +0 -1
- package/script/tl/1_utilities_test.d.ts.map +0 -1
- package/script/tl/2_tl_reader.d.ts.map +0 -1
- package/script/tl/2_tl_reader.js +0 -150
- package/script/tl/2_tl_reader_test.d.ts.map +0 -1
- package/script/tl/2_tl_writer.d.ts.map +0 -1
- package/script/tl/2_tl_writer_test.d.ts.map +0 -1
- package/script/tl/2_utilities.d.ts.map +0 -1
- package/script/tl/2_utilities.js +0 -98
package/script/types/1_user.js
CHANGED
|
@@ -43,7 +43,7 @@ function constructUser(user_) {
|
|
|
43
43
|
isSupport: user_.support || false,
|
|
44
44
|
addedToAttachmentMenu: user_.attach_menu_enabled || false,
|
|
45
45
|
};
|
|
46
|
-
if (
|
|
46
|
+
if (_2_tl_js_1.Api.is("userProfilePhoto", user_.photo)) {
|
|
47
47
|
user.photo = (0, _0_chat_photo_js_1.constructChatPhoto)(user_.photo, user.id, user_.access_hash ?? 0n);
|
|
48
48
|
}
|
|
49
49
|
return (0, _1_utilities_js_1.cleanObject)(user);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_venue.d.ts","sourceRoot":"","sources":["../../src/types/1_venue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"1_venue.d.ts","sourceRoot":"","sources":["../../src/types/1_venue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAqB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE9D,sBAAsB;AACtB,MAAM,WAAW,KAAK;IACpB,4DAA4D;IAC5D,QAAQ,EAAE,QAAQ,CAAC;IACnB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wCAAwC;IACxC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,GAAG,CAAC,iBAAiB,GAAG,GAAG,CAAC,cAAc,GAAG,KAAK,CASxF"}
|
package/script/types/1_venue.js
CHANGED
|
@@ -23,7 +23,7 @@ exports.constructVenue = constructVenue;
|
|
|
23
23
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
24
24
|
const _0_location_js_1 = require("./0_location.js");
|
|
25
25
|
function constructVenue(media_) {
|
|
26
|
-
const geo =
|
|
26
|
+
const geo = _2_tl_js_1.Api.as("geoPoint", media_.geo);
|
|
27
27
|
return {
|
|
28
28
|
location: (0, _0_location_js_1.constructLocation)(geo),
|
|
29
29
|
title: media_.title,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_video.d.ts","sourceRoot":"","sources":["../../src/types/1_video.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"1_video.d.ts","sourceRoot":"","sources":["../../src/types/1_video.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAsB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEjE,oBAAoB;AACpB,MAAM,WAAW,KAAK;IACpB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,QAAQ,EAAE,MAAM,CAAC;IACjB,sBAAsB;IACtB,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6BAA6B;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,CAAC,sBAAsB,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,KAAK,CAY5K"}
|
package/script/types/1_video.js
CHANGED
|
@@ -29,7 +29,7 @@ function constructVideo(document, videoAttribute, fileName, fileId, fileUniqueId
|
|
|
29
29
|
width: videoAttribute.w,
|
|
30
30
|
height: videoAttribute.h,
|
|
31
31
|
duration: videoAttribute.duration,
|
|
32
|
-
thumbnails: document.thumbs ? document.thumbs.map((v) =>
|
|
32
|
+
thumbnails: document.thumbs ? document.thumbs.map((v) => _2_tl_js_1.Api.is("photoSize", v) ? (0, _0_thumbnail_js_1.constructThumbnail)(v, document) : null).filter((v) => v) : [],
|
|
33
33
|
fileName,
|
|
34
34
|
mimeType: document.mime_type,
|
|
35
35
|
fileSize: Number(document.size),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_video_note.d.ts","sourceRoot":"","sources":["../../src/types/1_video_note.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"1_video_note.d.ts","sourceRoot":"","sources":["../../src/types/1_video_note.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAsB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEjE,oBAAoB;AACpB,MAAM,WAAW,SAAS;IACxB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,kFAAkF;IAClF,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,QAAQ,EAAE,MAAM,CAAC;IACjB,sBAAsB;IACtB,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,CAAC,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,SAAS,CAStJ"}
|
|
@@ -28,7 +28,7 @@ function constructVideoNote(document, videoAttribute, fileId, fileUniqueId) {
|
|
|
28
28
|
fileUniqueId,
|
|
29
29
|
length: videoAttribute.w,
|
|
30
30
|
duration: videoAttribute.duration,
|
|
31
|
-
thumbnails: document.thumbs ? document.thumbs.map((v) =>
|
|
31
|
+
thumbnails: document.thumbs ? document.thumbs.map((v) => _2_tl_js_1.Api.is("photoSize", v) ? (0, _0_thumbnail_js_1.constructThumbnail)(v, document) : null).filter((v) => v) : [],
|
|
32
32
|
fileSize: Number(document.size),
|
|
33
33
|
};
|
|
34
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_chat.d.ts","sourceRoot":"","sources":["../../src/types/2_chat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"2_chat.d.ts","sourceRoot":"","sources":["../../src/types/2_chat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAqB,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAqB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAyB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,eAAe,EAAkB,MAAM,eAAe,CAAC;AAExG,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,gBAAgB;AAChB,MAAM,WAAW,QAAQ;IACvB,wBAAwB;IACxB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,gBAAgB;AAChB,MAAM,WAAW,WAAY,SAAQ,QAAQ,EAAE,YAAY;IACzD,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,gBAAgB;AAChB,MAAM,WAAW,cAAe,SAAQ,QAAQ,EAAE,eAAe;IAC/D,gCAAgC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,gBAAgB;AAChB,MAAM,WAAW,SAAU,SAAQ,QAAQ,EAAE,UAAU;IACrD,gCAAgC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,gBAAgB;AAChB,MAAM,WAAW,WAAY,SAAQ,QAAQ,EAAE,YAAY;IACzD,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,yCAAyC;IACzC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,qDAAqD;IACrD,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,MAAM,IAAI,GAAG,WAAW,GAAG,cAAc,GAAG,SAAS,GAAG,WAAW,CAAC;AAE1E,wBAAsB,aAAa,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,WAAW,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAmCnI"}
|
package/script/types/2_chat.js
CHANGED
|
@@ -29,7 +29,7 @@ const _0_opening_hours_js_1 = require("./0_opening_hours.js");
|
|
|
29
29
|
const _1_chat_p_js_1 = require("./1_chat_p.js");
|
|
30
30
|
const _1_photo_js_1 = require("./1_photo.js");
|
|
31
31
|
async function constructChat(fullChat, getEntity) {
|
|
32
|
-
if (
|
|
32
|
+
if (_2_tl_js_1.Api.is("userFull", fullChat)) {
|
|
33
33
|
const user = await getEntity({ _: "peerUser", user_id: fullChat.id });
|
|
34
34
|
if (user == null)
|
|
35
35
|
(0, _0_deps_js_1.unreachable)();
|
|
@@ -37,32 +37,32 @@ async function constructChat(fullChat, getEntity) {
|
|
|
37
37
|
return (0, _1_utilities_js_1.cleanObject)({
|
|
38
38
|
...chatP,
|
|
39
39
|
birthday: fullChat.birthday ? (0, _0_birthday_js_1.constructBirthday)(fullChat.birthday) : undefined,
|
|
40
|
-
photo: fullChat.profile_photo &&
|
|
40
|
+
photo: fullChat.profile_photo && _2_tl_js_1.Api.is("photo", fullChat.profile_photo) ? (0, _1_photo_js_1.constructPhoto)(fullChat.profile_photo) : undefined,
|
|
41
41
|
address: fullChat.business_location?.address,
|
|
42
|
-
location: fullChat.business_location?.geo_point &&
|
|
42
|
+
location: fullChat.business_location?.geo_point && _2_tl_js_1.Api.is("geoPoint", fullChat.business_location.geo_point) ? (0, _0_location_js_1.constructLocation)(fullChat.business_location.geo_point) : undefined,
|
|
43
43
|
openingHours: fullChat.business_work_hours ? (0, _0_opening_hours_js_1.constructOpeningHours)(fullChat.business_work_hours) : undefined,
|
|
44
44
|
hasMainMiniApp: user.bot ? user.bot_has_main_app : undefined,
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
else if (
|
|
47
|
+
else if (_2_tl_js_1.Api.is("chatFull", fullChat)) {
|
|
48
48
|
const chat = await getEntity({ _: "peerChat", chat_id: fullChat.id });
|
|
49
49
|
if (chat == null)
|
|
50
50
|
(0, _0_deps_js_1.unreachable)();
|
|
51
51
|
const chatP = (0, _1_chat_p_js_1.constructChatP)(chat);
|
|
52
52
|
return (0, _1_utilities_js_1.cleanObject)({
|
|
53
53
|
...chatP,
|
|
54
|
-
photo: fullChat.chat_photo &&
|
|
54
|
+
photo: fullChat.chat_photo && _2_tl_js_1.Api.is("photo", fullChat.chat_photo) ? (0, _1_photo_js_1.constructPhoto)(fullChat.chat_photo) : undefined,
|
|
55
55
|
videoChatId: fullChat.call ? String(fullChat.call.id) : undefined,
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
else if (
|
|
58
|
+
else if (_2_tl_js_1.Api.is("channelFull", fullChat)) {
|
|
59
59
|
const chat = await getEntity({ _: "peerChannel", channel_id: fullChat.id });
|
|
60
60
|
if (chat == null)
|
|
61
61
|
(0, _0_deps_js_1.unreachable)();
|
|
62
62
|
const chatP = (0, _1_chat_p_js_1.constructChatP)(chat);
|
|
63
63
|
return (0, _1_utilities_js_1.cleanObject)({
|
|
64
64
|
...chatP,
|
|
65
|
-
photo: fullChat.chat_photo &&
|
|
65
|
+
photo: fullChat.chat_photo && _2_tl_js_1.Api.is("photo", fullChat.chat_photo) ? (0, _1_photo_js_1.constructPhoto)(fullChat.chat_photo) : undefined,
|
|
66
66
|
videoChatId: fullChat.call ? String(fullChat.call.id) : undefined,
|
|
67
67
|
});
|
|
68
68
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_chat_member.d.ts","sourceRoot":"","sources":["../../src/types/2_chat_member.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"2_chat_member.d.ts","sourceRoot":"","sources":["../../src/types/2_chat_member.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAoC,MAAM,kCAAkC,CAAC;AAC7G,OAAO,EAAE,gBAAgB,EAA6B,MAAM,2BAA2B,CAAC;AACxF,OAAO,EAAiB,IAAI,EAAE,MAAM,aAAa,CAAC;AAElD,gBAAgB;AAChB,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,eAAe,GAAG,QAAQ,GAAG,YAAY,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEzG,gBAAgB;AAChB,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,gBAAgB,CAAC;IACzB,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,gBAAgB;AAChB,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,MAAM,EAAE,SAAS,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,gBAAgB;AAChB,MAAM,WAAW,uBAAwB,SAAQ,eAAe;IAC9D,MAAM,EAAE,eAAe,CAAC;IACxB,MAAM,EAAE,uBAAuB,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,gBAAgB;AAChB,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,MAAM,EAAE,QAAQ,CAAC;CAClB;AAED,gBAAgB;AAChB,MAAM,WAAW,oBAAqB,SAAQ,eAAe;IAC3D,MAAM,EAAE,YAAY,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,gBAAgB,CAAC;IACzB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB;AAED,gBAAgB;AAChB,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,gBAAgB;AAChB,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,MAAM,EAAE,QAAQ,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB;AAED,qBAAqB;AACrB,MAAM,MAAM,UAAU,GAAG,iBAAiB,GAAG,uBAAuB,GAAG,gBAAgB,GAAG,oBAAoB,GAAG,cAAc,GAAG,gBAAgB,CAAC;AAEnJ,wBAAsB,mBAAmB,CAAC,WAAW,EAAE,GAAG,CAAC,kBAAkB,GAAG,GAAG,CAAC,eAAe,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,CA0EjJ"}
|
|
@@ -27,17 +27,17 @@ const _0_chat_administrator_rights_js_1 = require("./0_chat_administrator_rights
|
|
|
27
27
|
const _0_chat_member_rights_js_1 = require("./0_chat_member_rights.js");
|
|
28
28
|
const _1_user_js_1 = require("./1_user.js");
|
|
29
29
|
async function constructChatMember(participant, getEntity) {
|
|
30
|
-
const user_ = "user_id" in participant ? await getEntity({ ...participant, _: "peerUser" }) : "peer" in participant ?
|
|
30
|
+
const user_ = "user_id" in participant ? await getEntity({ ...participant, _: "peerUser" }) : "peer" in participant ? _2_tl_js_1.Api.is("peerUser", participant.peer) ? await getEntity(participant.peer) : (0, _0_deps_js_1.unreachable)() : (0, _0_deps_js_1.unreachable)(); // TODO: support other peer types
|
|
31
31
|
if (user_ == null)
|
|
32
32
|
(0, _0_deps_js_1.unreachable)();
|
|
33
33
|
const user = (0, _1_user_js_1.constructUser)(user_);
|
|
34
|
-
if (
|
|
34
|
+
if (_2_tl_js_1.Api.is("channelParticipant", participant) || _2_tl_js_1.Api.is("chatParticipant", participant)) {
|
|
35
35
|
return {
|
|
36
36
|
status: "member",
|
|
37
37
|
user,
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
else if (
|
|
40
|
+
else if (_2_tl_js_1.Api.is("channelParticipantCreator", participant)) {
|
|
41
41
|
return (0, _1_utilities_js_1.cleanObject)({
|
|
42
42
|
status: "creator",
|
|
43
43
|
user,
|
|
@@ -45,7 +45,7 @@ async function constructChatMember(participant, getEntity) {
|
|
|
45
45
|
title: participant.rank,
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
-
else if (
|
|
48
|
+
else if (_2_tl_js_1.Api.is("channelParticipantAdmin", participant)) {
|
|
49
49
|
return (0, _1_utilities_js_1.cleanObject)({
|
|
50
50
|
status: "administrator",
|
|
51
51
|
user,
|
|
@@ -53,7 +53,7 @@ async function constructChatMember(participant, getEntity) {
|
|
|
53
53
|
title: participant.rank,
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
-
else if (
|
|
56
|
+
else if (_2_tl_js_1.Api.is("channelParticipantBanned", participant)) {
|
|
57
57
|
const untilDate = participant.banned_rights.until_date ? (0, _1_utilities_js_1.fromUnixTimestamp)(participant.banned_rights.until_date) : undefined;
|
|
58
58
|
if (!participant.banned_rights.view_messages) {
|
|
59
59
|
participant.peer;
|
|
@@ -73,13 +73,13 @@ async function constructChatMember(participant, getEntity) {
|
|
|
73
73
|
untilDate,
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
-
else if (
|
|
76
|
+
else if (_2_tl_js_1.Api.is("channelParticipantSelf", participant)) {
|
|
77
77
|
(0, _0_deps_js_1.unreachable)(); // TODO: implement
|
|
78
78
|
}
|
|
79
|
-
else if (
|
|
79
|
+
else if (_2_tl_js_1.Api.is("channelParticipantLeft", participant)) {
|
|
80
80
|
return { status: "left", user };
|
|
81
81
|
}
|
|
82
|
-
else if (
|
|
82
|
+
else if (_2_tl_js_1.Api.is("chatParticipantAdmin", participant)) {
|
|
83
83
|
return (0, _1_utilities_js_1.cleanObject)({
|
|
84
84
|
status: "administrator",
|
|
85
85
|
user,
|
|
@@ -99,7 +99,7 @@ async function constructChatMember(participant, getEntity) {
|
|
|
99
99
|
},
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
|
-
else if (
|
|
102
|
+
else if (_2_tl_js_1.Api.is("chatParticipantCreator", participant)) {
|
|
103
103
|
return (0, _1_utilities_js_1.cleanObject)({
|
|
104
104
|
status: "creator",
|
|
105
105
|
user,
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
3
|
+
* Copyright (C) 2023-2025 Roj <https://roj.im/>
|
|
4
|
+
*
|
|
5
|
+
* This file is part of MTKruto.
|
|
6
|
+
*
|
|
7
|
+
* This program is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
* (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* This program is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* GNU Lesser General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
*/
|
|
1
20
|
import { Api } from "../2_tl.js";
|
|
2
21
|
import { User } from "./1_user.js";
|
|
3
22
|
export interface ChatSettings {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_chat_settings.d.ts","sourceRoot":"","sources":["../../src/types/2_chat_settings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"2_chat_settings.d.ts","sourceRoot":"","sources":["../../src/types/2_chat_settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAiB,IAAI,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;IACtB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,eAAe,CAAC,EAAE,IAAI,CAAC;IACvB,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,IAAI,CAAC;IACtB,eAAe,CAAC,EAAE,IAAI,CAAC;CACxB;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,GAAG,CAAC,qBAAqB,GAAG,YAAY,CA4BxF"}
|
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
4
|
+
* Copyright (C) 2023-2025 Roj <https://roj.im/>
|
|
5
|
+
*
|
|
6
|
+
* This file is part of MTKruto.
|
|
7
|
+
*
|
|
8
|
+
* This program is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU Lesser General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
19
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
2
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
22
|
exports.constructChatSettings = constructChatSettings;
|
|
4
23
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
@@ -28,7 +47,7 @@ function constructChatSettings(settings_) {
|
|
|
28
47
|
photoChangeDate: settings_.settings.photo_change_date ? (0, _1_utilities_js_1.fromUnixTimestamp)(settings_.settings.photo_change_date) : undefined,
|
|
29
48
|
};
|
|
30
49
|
const bot = settings_.users.find((v) => v.id == settings_.settings.business_bot_id);
|
|
31
|
-
if (
|
|
50
|
+
if (_2_tl_js_1.Api.is("user", bot)) {
|
|
32
51
|
settings.businessBot = (0, _1_user_js_1.constructUser)(bot);
|
|
33
52
|
}
|
|
34
53
|
return (0, _1_utilities_js_1.cleanObject)(settings);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_chosen_inline_result.d.ts","sourceRoot":"","sources":["../../src/types/2_chosen_inline_result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"2_chosen_inline_result.d.ts","sourceRoot":"","sources":["../../src/types/2_chosen_inline_result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAqB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAiB,IAAI,EAAE,MAAM,aAAa,CAAC;AAElD,8BAA8B;AAC9B,MAAM,WAAW,kBAAkB;IACjC,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,IAAI,EAAE,IAAI,CAAC;IACX,qDAAqD;IACrD,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,6CAA6C;IAC7C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAsB,2BAA2B,CAAC,IAAI,EAAE,GAAG,CAAC,mBAAmB,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAYrI"}
|
|
@@ -27,14 +27,14 @@ const _0_location_js_1 = require("./0_location.js");
|
|
|
27
27
|
const _1_user_js_1 = require("./1_user.js");
|
|
28
28
|
async function constructChosenInlineResult(ubis, getEntity) {
|
|
29
29
|
const entity = await getEntity({ ...ubis, _: "peerUser" });
|
|
30
|
-
if (!entity || !(
|
|
30
|
+
if (!entity || !(_2_tl_js_1.Api.is("user", entity))) {
|
|
31
31
|
(0, _0_deps_js_1.unreachable)();
|
|
32
32
|
}
|
|
33
33
|
return (0, _1_utilities_js_1.cleanObject)({
|
|
34
34
|
resultId: ubis.id,
|
|
35
35
|
from: (0, _1_user_js_1.constructUser)(entity),
|
|
36
|
-
location:
|
|
37
|
-
inlineMessageId: ubis.msg_id === undefined ? undefined : (0, _1_utilities_js_1.base64EncodeUrlSafe)(
|
|
36
|
+
location: _2_tl_js_1.Api.is("geoPoint", ubis.geo) ? (0, _0_location_js_1.constructLocation)(ubis.geo) : undefined,
|
|
37
|
+
inlineMessageId: ubis.msg_id === undefined ? undefined : (0, _1_utilities_js_1.base64EncodeUrlSafe)(_2_tl_js_1.Api.serializeObject(ubis.msg_id)),
|
|
38
38
|
query: ubis.query,
|
|
39
39
|
});
|
|
40
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_game.d.ts","sourceRoot":"","sources":["../../src/types/2_game.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"2_game.d.ts","sourceRoot":"","sources":["../../src/types/2_game.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAsB,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAkB,KAAK,EAAE,MAAM,cAAc,CAAC;AAErD,cAAc;AACd,MAAM,WAAW,IAAI;IACnB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,KAAK,EAAE,KAAK,CAAC;IACb,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,YAAY,CAAC,EAAE,aAAa,EAAE,CAAC;IAC/B,8DAA8D;IAC9D,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,gBAAgB,GAAG,IAAI,CA0BhE"}
|
package/script/types/2_game.js
CHANGED
|
@@ -27,7 +27,7 @@ const _1_animation_js_1 = require("./1_animation.js");
|
|
|
27
27
|
const _1_photo_js_1 = require("./1_photo.js");
|
|
28
28
|
function constructGame(media_) {
|
|
29
29
|
const game_ = media_.game;
|
|
30
|
-
const document_ = game_.document ?
|
|
30
|
+
const document_ = game_.document ? _2_tl_js_1.Api.as("document", game_.document) : undefined;
|
|
31
31
|
const fileId_ = document_
|
|
32
32
|
? {
|
|
33
33
|
type: _file_id_js_1.FileType.Animation,
|
|
@@ -39,9 +39,9 @@ function constructGame(media_) {
|
|
|
39
39
|
return (0, _1_utilities_js_1.cleanObject)({
|
|
40
40
|
title: game_.title,
|
|
41
41
|
description: media_.game.description,
|
|
42
|
-
photo: (0, _1_photo_js_1.constructPhoto)(
|
|
42
|
+
photo: (0, _1_photo_js_1.constructPhoto)(_2_tl_js_1.Api.as("photo", game_.photo)),
|
|
43
43
|
animation: fileId_ && document_
|
|
44
|
-
? (0, _1_animation_js_1.constructAnimation)(document_, document_.attributes.find((v) =>
|
|
44
|
+
? (0, _1_animation_js_1.constructAnimation)(document_, document_.attributes.find((v) => _2_tl_js_1.Api.is("documentAttributeVideo", v)), document_.attributes.find((v) => _2_tl_js_1.Api.is("documentAttributeFilename", v)), (0, _file_id_js_1.serializeFileId)(fileId_), (0, _file_id_js_1.toUniqueFileId)(fileId_))
|
|
45
45
|
: undefined,
|
|
46
46
|
});
|
|
47
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_gift_upgraded_component.d.ts","sourceRoot":"","sources":["../../src/types/2_gift_upgraded_component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"2_gift_upgraded_component.d.ts","sourceRoot":"","sources":["../../src/types/2_gift_upgraded_component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAA0B,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAAqB,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE5D;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACzC,qBAAqB;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,0CAA0C;IAC1C,OAAO,EAAE,OAAO,CAAC;IACjB,uFAAuF;IACvF,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC3C,qBAAqB;IACrB,IAAI,EAAE,SAAS,CAAC;IAChB,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,OAAO,EAAE,OAAO,CAAC;IACjB,yFAAyF;IACzF,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAC5C,qBAAqB;IACrB,IAAI,EAAE,UAAU,CAAC;IACjB,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,YAAY,EAAE,MAAM,CAAC;IACrB,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,0FAA0F;IAC1F,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,oCAAoC;IACnD,qBAAqB;IACrB,IAAI,EAAE,iBAAiB,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,0BAA0B,GAAG,4BAA4B,GAAG,6BAA6B,GAAG,oCAAoC,CAAC;AAErK,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,GAAG,CAAC,iBAAiB,GAAG,qBAAqB,CA+DtG"}
|
|
@@ -31,7 +31,7 @@ function constructGiftUpgradedComponent(attribute) {
|
|
|
31
31
|
const rarityLevel = "rarity_permille" in attribute ? attribute.rarity_permille : 0;
|
|
32
32
|
switch (attribute._) {
|
|
33
33
|
case "starGiftAttributeModel": {
|
|
34
|
-
if (!
|
|
34
|
+
if (!_2_tl_js_1.Api.is("document", attribute.document)) {
|
|
35
35
|
(0, _0_deps_js_1.unreachable)();
|
|
36
36
|
}
|
|
37
37
|
const fileId = {
|
|
@@ -49,7 +49,7 @@ function constructGiftUpgradedComponent(attribute) {
|
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
case "starGiftAttributePattern": {
|
|
52
|
-
if (!
|
|
52
|
+
if (!_2_tl_js_1.Api.is("document", attribute.document)) {
|
|
53
53
|
(0, _0_deps_js_1.unreachable)();
|
|
54
54
|
}
|
|
55
55
|
const fileId = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_inactive_chat.d.ts","sourceRoot":"","sources":["../../src/types/2_inactive_chat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"2_inactive_chat.d.ts","sourceRoot":"","sources":["../../src/types/2_inactive_chat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,KAAK,EAAkB,MAAM,eAAe,CAAC;AAEtD,wBAAwB;AACxB,MAAM,WAAW,YAAY;IAC3B,+CAA+C;IAC/C,YAAY,EAAE,IAAI,CAAC;IACnB,iDAAiD;IACjD,IAAI,EAAE,KAAK,CAAC;CACb;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,GAAG,YAAY,CASzF"}
|
|
@@ -25,7 +25,7 @@ const _1_utilities_js_1 = require("../1_utilities.js");
|
|
|
25
25
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
26
26
|
const _1_chat_p_js_1 = require("./1_chat_p.js");
|
|
27
27
|
function constructInactiveChat(chat_, lastActivity) {
|
|
28
|
-
if (
|
|
28
|
+
if (_2_tl_js_1.Api.is("chatEmpty", chat_)) {
|
|
29
29
|
(0, _0_deps_js_1.unreachable)();
|
|
30
30
|
}
|
|
31
31
|
const chat = (0, _1_chat_p_js_1.constructChatP)(chat_);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_inline_keyboard_button.d.ts","sourceRoot":"","sources":["../../src/types/2_inline_keyboard_button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"2_inline_keyboard_button.d.ts","sourceRoot":"","sources":["../../src/types/2_inline_keyboard_button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAwB,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEzE,gBAAgB;AAChB,MAAM,WAAW,yBAAyB;IACxC,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAwB,SAAQ,yBAAyB;IACxE;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;GAGG;AACH,MAAM,WAAW,4BAA6B,SAAQ,yBAAyB;IAC7E;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,gBAAgB;AAChB,MAAM,WAAW,2BAA4B,SAAQ,yBAAyB;IAC5E;;;OAGG;IACH,OAAO,EAAE,WAAW,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,yBAA0B,SAAQ,yBAAyB;IAC1E;;;OAGG;IACH,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,gCAAiC,SAAQ,yBAAyB;IACjF;;;OAGG;IACH,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,uCAAwC,SAAQ,yBAAyB;IACxF;;;OAGG;IACH,4BAA4B,EAAE,MAAM,CAAC;CACtC;AAED;;;GAGG;AACH,MAAM,WAAW,sCAAuC,SAAQ,yBAAyB;IACvF,qBAAqB;IACrB,4BAA4B,EAAE;QAC5B,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,aAAa,CAAC,EAAE,OAAO,CAAC;KACzB,CAAC;CACH;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAyB,SAAQ,yBAAyB;IACzE,qBAAqB;IACrB,YAAY,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;CACpC;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAwB,SAAQ,yBAAyB;IACxE,qBAAqB;IACrB,GAAG,EAAE,OAAO,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAyB,SAAQ,yBAAyB;IACzE,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,sCAAsC;AACtC,MAAM,MAAM,oBAAoB,GAC5B,uBAAuB,GACvB,4BAA4B,GAC5B,2BAA2B,GAC3B,yBAAyB,GACzB,gCAAgC,GAChC,uCAAuC,GACvC,sCAAsC,GACtC,wBAAwB,GACxB,uBAAuB,GACvB,wBAAwB,CAAC;AAE7B,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,GAAG,CAAC,cAAc,GAAG,oBAAoB,CAgC/F;AAED,wBAAsB,8BAA8B,CAAC,MAAM,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAuClJ"}
|
|
@@ -27,19 +27,19 @@ const _1_utilities_js_1 = require("../1_utilities.js");
|
|
|
27
27
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
28
28
|
const _0_mini_app_info_js_1 = require("./0_mini_app_info.js");
|
|
29
29
|
function constructInlineKeyboardButton(button_) {
|
|
30
|
-
if (
|
|
30
|
+
if (_2_tl_js_1.Api.is("keyboardButtonUrl", button_)) {
|
|
31
31
|
return { text: button_.text, url: button_.url };
|
|
32
32
|
}
|
|
33
|
-
else if (
|
|
33
|
+
else if (_2_tl_js_1.Api.is("keyboardButtonCallback", button_)) {
|
|
34
34
|
return { text: button_.text, callbackData: new TextDecoder().decode(button_.data) };
|
|
35
35
|
}
|
|
36
|
-
else if (
|
|
36
|
+
else if (_2_tl_js_1.Api.is("keyboardButtonWebView", button_) || _2_tl_js_1.Api.is("keyboardButtonSimpleWebView", button_)) {
|
|
37
37
|
return { text: button_.text, miniApp: (0, _0_mini_app_info_js_1.constructMiniAppInfo)(button_.url) };
|
|
38
38
|
}
|
|
39
|
-
else if (
|
|
39
|
+
else if (_2_tl_js_1.Api.is("keyboardButtonUrlAuth", button_)) {
|
|
40
40
|
return { text: button_.text, loginUrl: { url: button_.url, forwardText: button_.fwd_text } };
|
|
41
41
|
}
|
|
42
|
-
else if (
|
|
42
|
+
else if (_2_tl_js_1.Api.is("keyboardButtonSwitchInline", button_)) {
|
|
43
43
|
if (button_.same_peer) {
|
|
44
44
|
return { text: button_.text, switchInlineQueryCurrentChat: button_.query };
|
|
45
45
|
}
|
|
@@ -54,16 +54,16 @@ function constructInlineKeyboardButton(button_) {
|
|
|
54
54
|
return { text: button_.text, switchInlineQuery: button_.query };
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
else if (
|
|
57
|
+
else if (_2_tl_js_1.Api.is("keyboardButtonBuy", button_)) {
|
|
58
58
|
return { text: button_.text, pay: true };
|
|
59
59
|
}
|
|
60
|
-
else if (
|
|
60
|
+
else if (_2_tl_js_1.Api.is("keyboardButtonGame", button_)) {
|
|
61
61
|
return { text: button_.text, callbackGame: {} };
|
|
62
62
|
}
|
|
63
|
-
else if (
|
|
63
|
+
else if (_2_tl_js_1.Api.is("keyboardButtonCopy", button_)) {
|
|
64
64
|
return { text: button_.text, copy: button_.copy_text };
|
|
65
65
|
}
|
|
66
|
-
else if (
|
|
66
|
+
else if (_2_tl_js_1.Api.is("keyboardButtonRequestPeer", button_)) {
|
|
67
67
|
(0, _0_deps_js_1.unreachable)();
|
|
68
68
|
}
|
|
69
69
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_inline_query.d.ts","sourceRoot":"","sources":["../../src/types/2_inline_query.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"2_inline_query.d.ts","sourceRoot":"","sources":["../../src/types/2_inline_query.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAqB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAiB,IAAI,EAAE,MAAM,aAAa,CAAC;AAElD,gCAAgC;AAChC,MAAM,WAAW,WAAW;IAC1B,0CAA0C;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,0CAA0C;IAC1C,IAAI,EAAE,IAAI,CAAC;IACX,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,6GAA6G;IAC7G,MAAM,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,YAAY,GAAG,SAAS,CAAC;IACrE,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,GAAG,CAAC,oBAAoB,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,CAmC1H"}
|
|
@@ -32,26 +32,26 @@ async function constructInlineQuery(query_, getEntity) {
|
|
|
32
32
|
const user = (0, _1_user_js_1.constructUser)(user_);
|
|
33
33
|
let chatType;
|
|
34
34
|
if (query_.peer_type !== undefined) {
|
|
35
|
-
if (
|
|
35
|
+
if (_2_tl_js_1.Api.is("inlineQueryPeerTypeSameBotPM", query_.peer_type)) {
|
|
36
36
|
chatType = "private";
|
|
37
37
|
}
|
|
38
|
-
else if (
|
|
38
|
+
else if (_2_tl_js_1.Api.is("inlineQueryPeerTypeBotPM", query_.peer_type) || _2_tl_js_1.Api.is("inlineQueryPeerTypePM", query_.peer_type)) {
|
|
39
39
|
chatType = "sender";
|
|
40
40
|
}
|
|
41
|
-
else if (
|
|
41
|
+
else if (_2_tl_js_1.Api.is("inlineQueryPeerTypeChat", query_.peer_type)) {
|
|
42
42
|
chatType = "group";
|
|
43
43
|
}
|
|
44
|
-
else if (
|
|
44
|
+
else if (_2_tl_js_1.Api.is("inlineQueryPeerTypeMegagroup", query_.peer_type)) {
|
|
45
45
|
chatType = "supergroup";
|
|
46
46
|
}
|
|
47
|
-
else if (
|
|
47
|
+
else if (_2_tl_js_1.Api.is("inlineQueryPeerTypeBroadcast", query_.peer_type)) {
|
|
48
48
|
chatType = "channel";
|
|
49
49
|
}
|
|
50
50
|
else {
|
|
51
51
|
(0, _0_deps_js_1.unreachable)();
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
const location = query_.geo !== undefined &&
|
|
54
|
+
const location = query_.geo !== undefined && _2_tl_js_1.Api.is("geoPoint", query_.geo) ? (0, _0_location_js_1.constructLocation)(query_.geo) : undefined;
|
|
55
55
|
return {
|
|
56
56
|
id: String(query_.query_id),
|
|
57
57
|
from: user,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_message_reactions.d.ts","sourceRoot":"","sources":["../../src/types/2_message_reactions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"2_message_reactions.d.ts","sourceRoot":"","sources":["../../src/types/2_message_reactions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAqB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAkB,MAAM,eAAe,CAAC;AACtD,OAAO,EAAiB,IAAI,EAAE,MAAM,aAAa,CAAC;AAElD,wDAAwD;AACxD,MAAM,WAAW,gBAAgB;IAC/B,2DAA2D;IAC3D,IAAI,EAAE,KAAK,CAAC;IACZ,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,8FAA8F;IAC9F,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,6FAA6F;IAC7F,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,sDAAsD;IACtD,IAAI,EAAE,IAAI,CAAC;IACX,8BAA8B;IAC9B,YAAY,EAAE,QAAQ,EAAE,CAAC;IACzB,6BAA6B;IAC7B,YAAY,EAAE,QAAQ,EAAE,CAAC;CAC1B;AAED,wBAAsB,yBAAyB,CAAC,MAAM,EAAE,GAAG,CAAC,wBAAwB,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAkC/I"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_story_content.d.ts","sourceRoot":"","sources":["../../src/types/2_story_content.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"2_story_content.d.ts","sourceRoot":"","sources":["../../src/types/2_story_content.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAkB,KAAK,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAkB,KAAK,EAAE,MAAM,cAAc,CAAC;AAErD,gBAAgB;AAChB,MAAM,WAAW,iBAAiB;IAChC,qBAAqB;IACrB,KAAK,EAAE,KAAK,CAAC;CACd;AAED,gBAAgB;AAChB,MAAM,WAAW,iBAAiB;IAChC,qBAAqB;IACrB,KAAK,EAAE,KAAK,CAAC;CACd;AAED,gBAAgB;AAChB,MAAM,WAAW,uBAAuB;IACtC,qBAAqB;IACrB,WAAW,EAAE,IAAI,CAAC;CACnB;AAED,uBAAuB;AACvB,MAAM,MAAM,YAAY,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,uBAAuB,CAAC;AAE3F,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,GAAG,CAAC,YAAY,GAAG,YAAY,CA0B3E"}
|
|
@@ -26,19 +26,19 @@ const _file_id_js_1 = require("./_file_id.js");
|
|
|
26
26
|
const _1_photo_js_1 = require("./1_photo.js");
|
|
27
27
|
const _1_video_js_1 = require("./1_video.js");
|
|
28
28
|
function constructStoryContent(media) {
|
|
29
|
-
if (
|
|
29
|
+
if (_2_tl_js_1.Api.is("messageMediaPhoto", media)) {
|
|
30
30
|
if (!media.photo) {
|
|
31
31
|
(0, _0_deps_js_1.unreachable)();
|
|
32
32
|
}
|
|
33
|
-
const photo = (0, _1_photo_js_1.constructPhoto)(
|
|
33
|
+
const photo = (0, _1_photo_js_1.constructPhoto)(_2_tl_js_1.Api.as("photo", media.photo));
|
|
34
34
|
return { photo };
|
|
35
35
|
}
|
|
36
|
-
else if (
|
|
36
|
+
else if (_2_tl_js_1.Api.is("messageMediaDocument", media)) {
|
|
37
37
|
const document = media.document;
|
|
38
|
-
if (!(
|
|
38
|
+
if (!(_2_tl_js_1.Api.is("document", document))) {
|
|
39
39
|
(0, _0_deps_js_1.unreachable)();
|
|
40
40
|
}
|
|
41
|
-
const video = document.attributes.find((v) =>
|
|
41
|
+
const video = document.attributes.find((v) => _2_tl_js_1.Api.is("documentAttributeVideo", v));
|
|
42
42
|
if (!video) {
|
|
43
43
|
(0, _0_deps_js_1.unreachable)();
|
|
44
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_story_interactive_area.d.ts","sourceRoot":"","sources":["../../src/types/2_story_interactive_area.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"2_story_interactive_area.d.ts","sourceRoot":"","sources":["../../src/types/2_story_interactive_area.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAqB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAkB,KAAK,EAAE,MAAM,cAAc,CAAC;AAErD,gBAAgB;AAChB,MAAM,WAAW,4BAA4B;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,gBAAgB;AAChB,MAAM,WAAW,mCAAmC;IAClD,QAAQ,EAAE,4BAA4B,CAAC;CACxC;AAED,gBAAgB;AAChB,MAAM,WAAW,4BAA6B,SAAQ,mCAAmC;IACvF,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,gBAAgB;AAChB,MAAM,WAAW,yBAA0B,SAAQ,mCAAmC;IACpF,KAAK,EAAE,KAAK,CAAC;CACd;AAED,gBAAgB;AAChB,MAAM,WAAW,4BAA6B,SAAQ,mCAAmC;IACvF,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,gBAAgB;AAChB,MAAM,WAAW,2BAA4B,SAAQ,mCAAmC;IACtF,gBAAgB,EAAE,gBAAgB,CAAC;CACpC;AAED,kCAAkC;AAClC,MAAM,MAAM,oBAAoB,GAC5B,4BAA4B,GAC5B,yBAAyB,GACzB,4BAA4B,GAC5B,2BAA2B,CAAC;AAWhC,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,GAAG,CAAC,SAAS,GAAG,oBAAoB,CA+BvF;AAKD,wBAAsB,8BAA8B,CAAC,IAAI,EAAE,oBAAoB,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CA8BhI"}
|
|
@@ -37,18 +37,18 @@ function constructStoryInteractiveAreaPosition(position) {
|
|
|
37
37
|
}
|
|
38
38
|
function constructStoryInteractiveArea(area) {
|
|
39
39
|
const position = constructStoryInteractiveAreaPosition(area.coordinates);
|
|
40
|
-
if (
|
|
41
|
-
if (
|
|
40
|
+
if (_2_tl_js_1.Api.is("mediaAreaGeoPoint", area)) {
|
|
41
|
+
if (_2_tl_js_1.Api.is("geoPointEmpty", area.geo)) {
|
|
42
42
|
(0, _0_deps_js_1.unreachable)(); // will this ever be empty?
|
|
43
43
|
}
|
|
44
44
|
const location = (0, _0_location_js_1.constructLocation)(area.geo);
|
|
45
45
|
return { position, location };
|
|
46
46
|
}
|
|
47
|
-
else if (
|
|
47
|
+
else if (_2_tl_js_1.Api.is("mediaAreaVenue", area)) {
|
|
48
48
|
const venue = (0, _1_venue_js_1.constructVenue)(area);
|
|
49
49
|
return { position, venue };
|
|
50
50
|
}
|
|
51
|
-
else if (
|
|
51
|
+
else if (_2_tl_js_1.Api.is("mediaAreaSuggestedReaction", area)) {
|
|
52
52
|
const reaction = (0, _0_reaction_js_1.constructReaction)(area.reaction);
|
|
53
53
|
return {
|
|
54
54
|
position,
|
|
@@ -58,11 +58,11 @@ function constructStoryInteractiveArea(area) {
|
|
|
58
58
|
dark: area.dark ? true : false,
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
else if (
|
|
61
|
+
else if (_2_tl_js_1.Api.is("mediaAreaChannelPost", area)) {
|
|
62
62
|
return {
|
|
63
63
|
position,
|
|
64
64
|
messageReference: {
|
|
65
|
-
chatId:
|
|
65
|
+
chatId: _2_tl_js_1.Api.peerToChatId(area),
|
|
66
66
|
messageId: area.msg_id,
|
|
67
67
|
},
|
|
68
68
|
};
|
|
@@ -98,8 +98,8 @@ async function storyInteractiveAreaToTlObject(area, getEntity) {
|
|
|
98
98
|
return { _: "mediaAreaSuggestedReaction", coordinates, reaction, dark: area.dark ? true : undefined, flipped: area.flipped ? true : undefined };
|
|
99
99
|
}
|
|
100
100
|
else if ("messageReference" in area) {
|
|
101
|
-
const entity = await getEntity(
|
|
102
|
-
if (!(
|
|
101
|
+
const entity = await getEntity(_2_tl_js_1.Api.chatIdToPeer(area.messageReference.chatId));
|
|
102
|
+
if (!(_2_tl_js_1.Api.is("channel", entity))) {
|
|
103
103
|
(0, _0_deps_js_1.unreachable)();
|
|
104
104
|
}
|
|
105
105
|
const channel = { _: "inputChannel", channel_id: entity.id, access_hash: entity.access_hash ?? 0n };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"3_chat_member_updated.d.ts","sourceRoot":"","sources":["../../src/types/3_chat_member_updated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"3_chat_member_updated.d.ts","sourceRoot":"","sources":["../../src/types/3_chat_member_updated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAiB,IAAI,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,UAAU,EAAuB,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAuB,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErE,qCAAqC;AACrC,MAAM,WAAW,iBAAiB;IAChC,6CAA6C;IAC7C,IAAI,EAAE,KAAK,CAAC;IACZ,mCAAmC;IACnC,IAAI,EAAE,IAAI,CAAC;IACX,uEAAuE;IACvE,IAAI,EAAE,IAAI,CAAC;IACX,yCAAyC;IACzC,aAAa,EAAE,UAAU,CAAC;IAC1B,yCAAyC;IACzC,aAAa,EAAE,UAAU,CAAC;IAC1B,oCAAoC;IACpC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,oDAAoD;IACpD,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAsB,0BAA0B,CAAC,MAAM,EAAE,GAAG,CAAC,wBAAwB,GAAG,GAAG,CAAC,qBAAqB,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,iBAAiB,CAAC,CA0BtK"}
|
|
@@ -43,7 +43,7 @@ async function constructChatMemberUpdated(update, getEntity) {
|
|
|
43
43
|
const oldChatMember = await (0, _2_chat_member_js_1.constructChatMember)(update.prev_participant ?? ({ _: "channelParticipantLeft", peer: userPeer }), getEntity);
|
|
44
44
|
const newChatMember = await (0, _2_chat_member_js_1.constructChatMember)(update.new_participant ?? ({ _: "channelParticipantLeft", peer: userPeer }), getEntity);
|
|
45
45
|
const viaSharedFolder = "via_chatlist" in update ? update.via_chatlist ? true : update.invite ? false : undefined : undefined;
|
|
46
|
-
const inviteLink = (update.invite &&
|
|
46
|
+
const inviteLink = (update.invite && _2_tl_js_1.Api.is("chatInviteExported", update.invite)) ? await (0, _2_invite_link_js_1.constructInviteLink)(update.invite, getEntity) : undefined;
|
|
47
47
|
return (0, _1_utilities_js_1.cleanObject)({
|
|
48
48
|
chat,
|
|
49
49
|
from,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"3_gift.d.ts","sourceRoot":"","sources":["../../src/types/3_gift.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"3_gift.d.ts","sourceRoot":"","sources":["../../src/types/3_gift.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAqB,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAkC,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvG;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,qBAAqB;IACrB,IAAI,EAAE,aAAa,CAAC;IACpB,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,4CAA4C;IAC5C,OAAO,EAAE,OAAO,CAAC;IACjB,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,OAAO,EAAE,OAAO,CAAC;IACjB,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kDAAkD;IAClD,QAAQ,EAAE,OAAO,CAAC;IAClB,sEAAsE;IACtE,eAAe,EAAE,MAAM,CAAC;IACxB,0DAA0D;IAC1D,aAAa,CAAC,EAAE,IAAI,CAAC;IACrB,yDAAyD;IACzD,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,qBAAqB;IACrB,IAAI,EAAE,UAAU,CAAC;IACjB,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,KAAK,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,eAAe,EAAE,MAAM,CAAC;IACxB,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,UAAU,EAAE,qBAAqB,EAAE,CAAC;CACrC;AAED,cAAc;AACd,MAAM,MAAM,IAAI,GAAG,eAAe,GAAG,YAAY,CAAC;AAElD,wBAAgB,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,QAAQ,GAAG,IAAI,CAMtD;AACD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,GAAG,CAAC,cAAc,GAAG,YAAY,CAkB5E;AACD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,GAAG,CAAC,QAAQ,GAAG,IAAI,CAqCjE"}
|