tdlib-ruby 2.0.0 → 2.1.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.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/ChangeLog.md +5 -0
- data/README.md +9 -2
- data/bin/parser +32 -11
- data/lib/tdlib/client.rb +10 -5
- data/lib/tdlib/client_methods.rb +923 -386
- data/lib/tdlib/types.rb +176 -11
- data/lib/tdlib/types/animation.rb +2 -0
- data/lib/tdlib/types/audio.rb +2 -0
- data/lib/tdlib/types/authorization_state.rb +1 -0
- data/lib/tdlib/types/authorization_state/wait_code.rb +1 -6
- data/lib/tdlib/types/authorization_state/wait_password.rb +2 -2
- data/lib/tdlib/types/authorization_state/wait_registration.rb +9 -0
- data/lib/tdlib/types/auto_download_settings.rb +21 -0
- data/lib/tdlib/types/auto_download_settings_presets.rb +15 -0
- data/lib/tdlib/types/background.rb +19 -0
- data/lib/tdlib/types/background_type.rb +12 -0
- data/lib/tdlib/types/background_type/pattern.rb +12 -0
- data/lib/tdlib/types/background_type/solid.rb +8 -0
- data/lib/tdlib/types/background_type/wallpaper.rb +11 -0
- data/lib/tdlib/types/backgrounds.rb +8 -0
- data/lib/tdlib/types/basic_group.rb +0 -2
- data/lib/tdlib/types/basic_group_full_info.rb +2 -0
- data/lib/tdlib/types/call_problem.rb +16 -0
- data/lib/tdlib/types/call_problem/distorted_speech.rb +5 -0
- data/lib/tdlib/types/call_problem/dropped.rb +5 -0
- data/lib/tdlib/types/call_problem/echo.rb +5 -0
- data/lib/tdlib/types/call_problem/interruptions.rb +5 -0
- data/lib/tdlib/types/call_problem/noise.rb +5 -0
- data/lib/tdlib/types/call_problem/silent_local.rb +5 -0
- data/lib/tdlib/types/call_problem/silent_remote.rb +5 -0
- data/lib/tdlib/types/call_state/ready.rb +2 -0
- data/lib/tdlib/types/chat.rb +10 -0
- data/lib/tdlib/types/chat_event_action.rb +2 -0
- data/lib/tdlib/types/chat_event_action/invites_toggled.rb +3 -3
- data/lib/tdlib/types/chat_event_action/permissions_changed.rb +10 -0
- data/lib/tdlib/types/chat_event_action/photo_changed.rb +4 -4
- data/lib/tdlib/types/chat_event_action/poll_stopped.rb +8 -0
- data/lib/tdlib/types/chat_invite_link_info.rb +1 -1
- data/lib/tdlib/types/chat_member_status/administrator.rb +3 -3
- data/lib/tdlib/types/chat_member_status/restricted.rb +2 -13
- data/lib/tdlib/types/chat_members_filter.rb +1 -0
- data/lib/tdlib/types/chat_members_filter/contacts.rb +5 -0
- data/lib/tdlib/types/chat_notification_settings.rb +12 -0
- data/lib/tdlib/types/chat_permissions.rb +28 -0
- data/lib/tdlib/types/chat_photo.rb +2 -0
- data/lib/tdlib/types/chat_report_reason.rb +1 -0
- data/lib/tdlib/types/chat_report_reason/child_abuse.rb +5 -0
- data/lib/tdlib/types/check_chat_username_result/public_chats_too_much.rb +1 -1
- data/lib/tdlib/types/connection_state/waiting_for_network.rb +1 -1
- data/lib/tdlib/types/database_statistics.rb +8 -0
- data/lib/tdlib/types/device_token.rb +2 -2
- data/lib/tdlib/types/device_token/apple_push_vo_ip.rb +2 -0
- data/lib/tdlib/types/device_token/firebase_cloud_messaging.rb +10 -0
- data/lib/tdlib/types/document.rb +4 -1
- data/lib/tdlib/types/emojis.rb +8 -0
- data/lib/tdlib/types/file_part.rb +8 -0
- data/lib/tdlib/types/file_type/wallpaper.rb +1 -1
- data/lib/tdlib/types/http_url.rb +8 -0
- data/lib/tdlib/types/inline_keyboard_button_type.rb +1 -0
- data/lib/tdlib/types/inline_keyboard_button_type/login_url.rb +12 -0
- data/lib/tdlib/types/input_background.rb +11 -0
- data/lib/tdlib/types/input_background/local.rb +10 -0
- data/lib/tdlib/types/input_background/remote.rb +8 -0
- data/lib/tdlib/types/input_file/generated.rb +1 -0
- data/lib/tdlib/types/input_inline_query_result/animated_gif.rb +5 -4
- data/lib/tdlib/types/input_inline_query_result/animated_mpeg4.rb +5 -4
- data/lib/tdlib/types/input_inline_query_result/article.rb +5 -4
- data/lib/tdlib/types/input_inline_query_result/audio.rb +5 -4
- data/lib/tdlib/types/input_inline_query_result/contact.rb +5 -4
- data/lib/tdlib/types/input_inline_query_result/document.rb +5 -4
- data/lib/tdlib/types/input_inline_query_result/game.rb +2 -1
- data/lib/tdlib/types/input_inline_query_result/location.rb +5 -4
- data/lib/tdlib/types/input_inline_query_result/photo.rb +5 -3
- data/lib/tdlib/types/input_inline_query_result/sticker.rb +7 -6
- data/lib/tdlib/types/input_inline_query_result/venue.rb +5 -4
- data/lib/tdlib/types/input_inline_query_result/video.rb +5 -4
- data/lib/tdlib/types/input_inline_query_result/voice_note.rb +5 -4
- data/lib/tdlib/types/input_message_content.rb +1 -0
- data/lib/tdlib/types/input_message_content/forwarded.rb +7 -0
- data/lib/tdlib/types/input_message_content/poll.rb +11 -0
- data/lib/tdlib/types/input_thumbnail.rb +2 -2
- data/lib/tdlib/types/json_object_member.rb +10 -0
- data/lib/tdlib/types/json_value.rb +15 -0
- data/lib/tdlib/types/json_value/array.rb +8 -0
- data/lib/tdlib/types/json_value/boolean.rb +8 -0
- data/lib/tdlib/types/json_value/null.rb +5 -0
- data/lib/tdlib/types/json_value/number.rb +8 -0
- data/lib/tdlib/types/json_value/object.rb +8 -0
- data/lib/tdlib/types/json_value/string.rb +8 -0
- data/lib/tdlib/types/language_pack_info.rb +21 -0
- data/lib/tdlib/types/language_pack_string_value/pluralized.rb +1 -0
- data/lib/tdlib/types/link_state/is_contact.rb +1 -1
- data/lib/tdlib/types/link_state/knows_phone_number.rb +1 -1
- data/lib/tdlib/types/local_file.rb +5 -2
- data/lib/tdlib/types/log_stream.rb +12 -0
- data/lib/tdlib/types/log_stream/default.rb +5 -0
- data/lib/tdlib/types/log_stream/empty.rb +5 -0
- data/lib/tdlib/types/log_stream/file.rb +11 -0
- data/lib/tdlib/types/log_tags.rb +8 -0
- data/lib/tdlib/types/log_verbosity_level.rb +8 -0
- data/lib/tdlib/types/message.rb +3 -1
- data/lib/tdlib/types/message_content.rb +1 -0
- data/lib/tdlib/types/message_content/game_score.rb +1 -1
- data/lib/tdlib/types/message_content/pin_message.rb +1 -1
- data/lib/tdlib/types/message_content/poll.rb +8 -0
- data/lib/tdlib/types/message_forward_info.rb +13 -7
- data/lib/tdlib/types/message_forward_origin.rb +12 -0
- data/lib/tdlib/types/message_forward_origin/channel.rb +12 -0
- data/lib/tdlib/types/message_forward_origin/hidden_user.rb +8 -0
- data/lib/tdlib/types/message_forward_origin/user.rb +8 -0
- data/lib/tdlib/types/message_link_info.rb +14 -0
- data/lib/tdlib/types/message_sending_state/failed.rb +10 -0
- data/lib/tdlib/types/minithumbnail.rb +12 -0
- data/lib/tdlib/types/notification.rb +12 -0
- data/lib/tdlib/types/notification_group.rb +16 -0
- data/lib/tdlib/types/notification_group_type.rb +13 -0
- data/lib/tdlib/types/notification_group_type/calls.rb +5 -0
- data/lib/tdlib/types/notification_group_type/mentions.rb +6 -0
- data/lib/tdlib/types/notification_group_type/messages.rb +6 -0
- data/lib/tdlib/types/notification_group_type/secret_chat.rb +5 -0
- data/lib/tdlib/types/notification_settings_scope.rb +1 -0
- data/lib/tdlib/types/notification_settings_scope/channel_chats.rb +5 -0
- data/lib/tdlib/types/notification_settings_scope/group_chats.rb +2 -2
- data/lib/tdlib/types/notification_type.rb +13 -0
- data/lib/tdlib/types/notification_type/new_call.rb +8 -0
- data/lib/tdlib/types/notification_type/new_message.rb +8 -0
- data/lib/tdlib/types/notification_type/new_push_message.rb +15 -0
- data/lib/tdlib/types/notification_type/new_secret_chat.rb +5 -0
- data/lib/tdlib/types/option_value/boolean.rb +1 -1
- data/lib/tdlib/types/option_value/empty.rb +1 -1
- data/lib/tdlib/types/option_value/integer.rb +1 -1
- data/lib/tdlib/types/option_value/string.rb +1 -1
- data/lib/tdlib/types/page_block.rb +5 -0
- data/lib/tdlib/types/page_block/animation.rb +2 -2
- data/lib/tdlib/types/page_block/audio.rb +2 -2
- data/lib/tdlib/types/page_block/block_quote.rb +2 -2
- data/lib/tdlib/types/page_block/collage.rb +2 -2
- data/lib/tdlib/types/page_block/details.rb +12 -0
- data/lib/tdlib/types/page_block/embedded.rb +4 -4
- data/lib/tdlib/types/page_block/embedded_post.rb +4 -4
- data/lib/tdlib/types/page_block/kicker.rb +8 -0
- data/lib/tdlib/types/page_block/list.rb +3 -5
- data/lib/tdlib/types/page_block/map.rb +16 -0
- data/lib/tdlib/types/page_block/photo.rb +4 -2
- data/lib/tdlib/types/page_block/pull_quote.rb +2 -2
- data/lib/tdlib/types/page_block/related_articles.rb +10 -0
- data/lib/tdlib/types/page_block/slideshow.rb +2 -2
- data/lib/tdlib/types/page_block/table.rb +14 -0
- data/lib/tdlib/types/page_block/video.rb +2 -2
- data/lib/tdlib/types/page_block_caption.rb +10 -0
- data/lib/tdlib/types/page_block_horizontal_alignment.rb +12 -0
- data/lib/tdlib/types/page_block_horizontal_alignment/center.rb +5 -0
- data/lib/tdlib/types/page_block_horizontal_alignment/left.rb +5 -0
- data/lib/tdlib/types/page_block_horizontal_alignment/right.rb +5 -0
- data/lib/tdlib/types/page_block_list_item.rb +10 -0
- data/lib/tdlib/types/page_block_related_article.rb +18 -0
- data/lib/tdlib/types/page_block_table_cell.rb +18 -0
- data/lib/tdlib/types/page_block_vertical_alignment.rb +12 -0
- data/lib/tdlib/types/page_block_vertical_alignment/bottom.rb +5 -0
- data/lib/tdlib/types/page_block_vertical_alignment/middle.rb +5 -0
- data/lib/tdlib/types/page_block_vertical_alignment/top.rb +5 -0
- data/lib/tdlib/types/passport_authorization_form.rb +1 -5
- data/lib/tdlib/types/passport_element_error_source/file.rb +3 -0
- data/lib/tdlib/types/passport_element_error_source/translation_file.rb +3 -0
- data/lib/tdlib/types/passport_elements_with_errors.rb +10 -0
- data/lib/tdlib/types/password_state.rb +7 -7
- data/lib/tdlib/types/phone_number_authentication_settings.rb +16 -0
- data/lib/tdlib/types/photo.rb +2 -2
- data/lib/tdlib/types/poll.rb +16 -0
- data/lib/tdlib/types/poll_option.rb +16 -0
- data/lib/tdlib/types/profile_photo.rb +2 -0
- data/lib/tdlib/types/public_message_link.rb +1 -1
- data/lib/tdlib/types/push_message_content.rb +35 -0
- data/lib/tdlib/types/push_message_content/animation.rb +12 -0
- data/lib/tdlib/types/push_message_content/audio.rb +10 -0
- data/lib/tdlib/types/push_message_content/basic_group_chat_create.rb +5 -0
- data/lib/tdlib/types/push_message_content/chat_add_members.rb +12 -0
- data/lib/tdlib/types/push_message_content/chat_change_photo.rb +5 -0
- data/lib/tdlib/types/push_message_content/chat_change_title.rb +8 -0
- data/lib/tdlib/types/push_message_content/chat_delete_member.rb +12 -0
- data/lib/tdlib/types/push_message_content/chat_join_by_link.rb +5 -0
- data/lib/tdlib/types/push_message_content/contact.rb +10 -0
- data/lib/tdlib/types/push_message_content/contact_registered.rb +5 -0
- data/lib/tdlib/types/push_message_content/document.rb +10 -0
- data/lib/tdlib/types/push_message_content/game.rb +10 -0
- data/lib/tdlib/types/push_message_content/game_score.rb +12 -0
- data/lib/tdlib/types/push_message_content/hidden.rb +8 -0
- data/lib/tdlib/types/push_message_content/invoice.rb +10 -0
- data/lib/tdlib/types/push_message_content/location.rb +10 -0
- data/lib/tdlib/types/push_message_content/media_album.rb +12 -0
- data/lib/tdlib/types/push_message_content/message_forwards.rb +8 -0
- data/lib/tdlib/types/push_message_content/photo.rb +14 -0
- data/lib/tdlib/types/push_message_content/poll.rb +10 -0
- data/lib/tdlib/types/push_message_content/screenshot_taken.rb +5 -0
- data/lib/tdlib/types/push_message_content/sticker.rb +12 -0
- data/lib/tdlib/types/push_message_content/text.rb +10 -0
- data/lib/tdlib/types/push_message_content/video.rb +14 -0
- data/lib/tdlib/types/push_message_content/video_note.rb +10 -0
- data/lib/tdlib/types/push_message_content/voice_note.rb +10 -0
- data/lib/tdlib/types/push_receiver_id.rb +9 -0
- data/lib/tdlib/types/rich_text.rb +6 -0
- data/lib/tdlib/types/rich_text/anchor.rb +10 -0
- data/lib/tdlib/types/rich_text/icon.rb +13 -0
- data/lib/tdlib/types/rich_text/marked.rb +8 -0
- data/lib/tdlib/types/rich_text/phone_number.rb +10 -0
- data/lib/tdlib/types/rich_text/subscript.rb +8 -0
- data/lib/tdlib/types/rich_text/superscript.rb +8 -0
- data/lib/tdlib/types/scope_notification_settings.rb +6 -0
- data/lib/tdlib/types/search_messages_filter/unread_mention.rb +1 -1
- data/lib/tdlib/types/session.rb +3 -0
- data/lib/tdlib/types/sticker.rb +2 -0
- data/lib/tdlib/types/sticker_set.rb +10 -2
- data/lib/tdlib/types/sticker_set_info.rb +5 -0
- data/lib/tdlib/types/storage_statistics_fast.rb +4 -0
- data/lib/tdlib/types/supergroup.rb +2 -3
- data/lib/tdlib/types/supergroup_full_info.rb +2 -2
- data/lib/tdlib/types/supergroup_members_filter.rb +1 -0
- data/lib/tdlib/types/supergroup_members_filter/contacts.rb +8 -0
- data/lib/tdlib/types/terms_of_service.rb +1 -1
- data/lib/tdlib/types/update.rb +9 -0
- data/lib/tdlib/types/update/active_notifications.rb +10 -0
- data/lib/tdlib/types/update/chat_online_member_count.rb +12 -0
- data/lib/tdlib/types/update/chat_order.rb +1 -1
- data/lib/tdlib/types/update/chat_permissions.rb +10 -0
- data/lib/tdlib/types/update/chat_pinned_message.rb +11 -0
- data/lib/tdlib/types/update/delete_messages.rb +1 -1
- data/lib/tdlib/types/update/have_pending_notifications.rb +13 -0
- data/lib/tdlib/types/update/message_send_failed.rb +1 -1
- data/lib/tdlib/types/update/new_message.rb +0 -4
- data/lib/tdlib/types/update/notification.rb +10 -0
- data/lib/tdlib/types/update/notification_group.rb +26 -0
- data/lib/tdlib/types/update/poll.rb +8 -0
- data/lib/tdlib/types/update/selected_background.rb +10 -0
- data/lib/tdlib/types/updates.rb +8 -0
- data/lib/tdlib/types/user.rb +4 -0
- data/lib/tdlib/types/user_privacy_setting.rb +3 -0
- data/lib/tdlib/types/user_privacy_setting/allow_peer_to_peer_calls.rb +5 -0
- data/lib/tdlib/types/user_privacy_setting/show_link_in_forwarded_messages.rb +5 -0
- data/lib/tdlib/types/user_privacy_setting/show_profile_photo.rb +5 -0
- data/lib/tdlib/types/user_profile_photo.rb +12 -0
- data/lib/tdlib/types/user_profile_photos.rb +2 -2
- data/lib/tdlib/types/video.rb +2 -0
- data/lib/tdlib/types/video_note.rb +2 -0
- data/lib/tdlib/types/web_page.rb +3 -2
- data/lib/tdlib/types/web_page_instant_view.rb +7 -0
- data/lib/tdlib/update_manager.rb +5 -12
- data/lib/tdlib/version.rb +1 -1
- data/spec/integration/tdlib_spec.rb +8 -0
- metadata +139 -9
- data/lib/tdlib/types/device_token/google_cloud_messaging.rb +0 -8
- data/lib/tdlib/types/message_forward_info/message_forwarded_from_user.rb +0 -16
- data/lib/tdlib/types/message_forward_info/message_forwarded_post.rb +0 -21
- data/lib/tdlib/types/sticker_emojis.rb +0 -10
- data/lib/tdlib/types/wallpaper.rb +0 -14
- data/lib/tdlib/types/wallpapers.rb +0 -8
@@ -4,24 +4,32 @@ module TD::Types
|
|
4
4
|
# @attr id [Integer] Identifier of the sticker set.
|
5
5
|
# @attr title [String] Title of the sticker set.
|
6
6
|
# @attr name [String] Name of the sticker set.
|
7
|
+
# @attr thumbnail [TD::Types::PhotoSize, nil] Sticker set thumbnail in WEBP format with width and height 100; may be
|
8
|
+
# null.
|
9
|
+
# The file can be downloaded only before the thumbnail is changed.
|
7
10
|
# @attr is_installed [Boolean] True, if the sticker set has been installed by the current user.
|
8
11
|
# @attr is_archived [Boolean] True, if the sticker set has been archived.
|
9
12
|
# A sticker set can't be installed and archived simultaneously.
|
10
13
|
# @attr is_official [Boolean] True, if the sticker set is official.
|
14
|
+
# @attr is_animated [Boolean] True, is the stickers in the set are animated.
|
11
15
|
# @attr is_masks [Boolean] True, if the stickers in the set are masks.
|
12
16
|
# @attr is_viewed [Boolean] True for already viewed trending sticker sets.
|
13
17
|
# @attr stickers [Array<TD::Types::Sticker>] List of stickers in this set.
|
14
|
-
# @attr emojis [Array<TD::Types::
|
18
|
+
# @attr emojis [Array<TD::Types::Emojis>] A list of emoji corresponding to the stickers in the same order.
|
19
|
+
# The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the
|
20
|
+
# corresponding Sticker object.
|
15
21
|
class StickerSet < Base
|
16
22
|
attribute :id, TD::Types::Integer
|
17
23
|
attribute :title, TD::Types::String
|
18
24
|
attribute :name, TD::Types::String
|
25
|
+
attribute :thumbnail, TD::Types::PhotoSize.optional.default(nil)
|
19
26
|
attribute :is_installed, TD::Types::Bool
|
20
27
|
attribute :is_archived, TD::Types::Bool
|
21
28
|
attribute :is_official, TD::Types::Bool
|
29
|
+
attribute :is_animated, TD::Types::Bool
|
22
30
|
attribute :is_masks, TD::Types::Bool
|
23
31
|
attribute :is_viewed, TD::Types::Bool
|
24
32
|
attribute :stickers, TD::Types::Array.of(TD::Types::Sticker)
|
25
|
-
attribute :emojis, TD::Types::Array.of(TD::Types::
|
33
|
+
attribute :emojis, TD::Types::Array.of(TD::Types::Emojis)
|
26
34
|
end
|
27
35
|
end
|
@@ -4,10 +4,13 @@ module TD::Types
|
|
4
4
|
# @attr id [Integer] Identifier of the sticker set.
|
5
5
|
# @attr title [String] Title of the sticker set.
|
6
6
|
# @attr name [String] Name of the sticker set.
|
7
|
+
# @attr thumbnail [TD::Types::PhotoSize, nil] Sticker set thumbnail in WEBP format with width and height 100; may be
|
8
|
+
# null.
|
7
9
|
# @attr is_installed [Boolean] True, if the sticker set has been installed by current user.
|
8
10
|
# @attr is_archived [Boolean] True, if the sticker set has been archived.
|
9
11
|
# A sticker set can't be installed and archived simultaneously.
|
10
12
|
# @attr is_official [Boolean] True, if the sticker set is official.
|
13
|
+
# @attr is_animated [Boolean] True, is the stickers in the set are animated.
|
11
14
|
# @attr is_masks [Boolean] True, if the stickers in the set are masks.
|
12
15
|
# @attr is_viewed [Boolean] True for already viewed trending sticker sets.
|
13
16
|
# @attr size [Integer] Total number of stickers in the set.
|
@@ -18,9 +21,11 @@ module TD::Types
|
|
18
21
|
attribute :id, TD::Types::Integer
|
19
22
|
attribute :title, TD::Types::String
|
20
23
|
attribute :name, TD::Types::String
|
24
|
+
attribute :thumbnail, TD::Types::PhotoSize.optional.default(nil)
|
21
25
|
attribute :is_installed, TD::Types::Bool
|
22
26
|
attribute :is_archived, TD::Types::Bool
|
23
27
|
attribute :is_official, TD::Types::Bool
|
28
|
+
attribute :is_animated, TD::Types::Bool
|
24
29
|
attribute :is_masks, TD::Types::Bool
|
25
30
|
attribute :is_viewed, TD::Types::Bool
|
26
31
|
attribute :size, TD::Types::Integer
|
@@ -4,9 +4,13 @@ module TD::Types
|
|
4
4
|
# @attr files_size [Integer] Approximate total size of files.
|
5
5
|
# @attr file_count [Integer] Approximate number of files.
|
6
6
|
# @attr database_size [Integer] Size of the database.
|
7
|
+
# @attr language_pack_database_size [Integer] Size of the language pack database.
|
8
|
+
# @attr log_size [Integer] Size of the TDLib internal log.
|
7
9
|
class StorageStatisticsFast < Base
|
8
10
|
attribute :files_size, TD::Types::Integer
|
9
11
|
attribute :file_count, TD::Types::Integer
|
10
12
|
attribute :database_size, TD::Types::Integer
|
13
|
+
attribute :language_pack_database_size, TD::Types::Integer
|
14
|
+
attribute :log_size, TD::Types::Integer
|
11
15
|
end
|
12
16
|
end
|
@@ -12,8 +12,6 @@ module TD::Types
|
|
12
12
|
# @attr status [TD::Types::ChatMemberStatus] Status of the current user in the supergroup or channel.
|
13
13
|
# @attr member_count [Integer] Member count; 0 if unknown.
|
14
14
|
# Currently it is guaranteed to be known only if the supergroup or channel was found through SearchPublicChats.
|
15
|
-
# @attr anyone_can_invite [Boolean] True, if any member of the supergroup can invite other members.
|
16
|
-
# This field has no meaning for channels.
|
17
15
|
# @attr sign_messages [Boolean] True, if messages sent to the channel should contain information about the sender.
|
18
16
|
# This field is only applicable to channels.
|
19
17
|
# @attr is_channel [Boolean] True, if the supergroup is a channel.
|
@@ -25,16 +23,17 @@ module TD::Types
|
|
25
23
|
# "-wp", which describe the platforms on which access should be restricted.
|
26
24
|
# (For example, "terms-ios-android".
|
27
25
|
# {description} contains a human-readable description of the restriction, which can be shown to the user).
|
26
|
+
# @attr is_scam [Boolean] True, if many users reported this supergroup as a scam.
|
28
27
|
class Supergroup < Base
|
29
28
|
attribute :id, TD::Types::Integer
|
30
29
|
attribute :username, TD::Types::String.optional.default(nil)
|
31
30
|
attribute :date, TD::Types::Integer
|
32
31
|
attribute :status, TD::Types::ChatMemberStatus
|
33
32
|
attribute :member_count, TD::Types::Integer
|
34
|
-
attribute :anyone_can_invite, TD::Types::Bool
|
35
33
|
attribute :sign_messages, TD::Types::Bool
|
36
34
|
attribute :is_channel, TD::Types::Bool
|
37
35
|
attribute :is_verified, TD::Types::Bool
|
38
36
|
attribute :restriction_reason, TD::Types::String
|
37
|
+
attribute :is_scam, TD::Types::Bool
|
39
38
|
end
|
40
39
|
end
|
@@ -9,13 +9,13 @@ module TD::Types
|
|
9
9
|
# @attr can_get_members [Boolean] True, if members of the chat can be retrieved.
|
10
10
|
# @attr can_set_username [Boolean] True, if the chat can be made public.
|
11
11
|
# @attr can_set_sticker_set [Boolean] True, if the supergroup sticker set can be changed.
|
12
|
+
# @attr can_view_statistics [Boolean] True, if the channel statistics is available through getChatStatisticsUrl.
|
12
13
|
# @attr is_all_history_available [Boolean] True, if new chat members will have access to old messages.
|
13
14
|
# In public supergroups and both public and private channels, old messages are always available, so this option
|
14
15
|
# affects only private supergroups.
|
15
16
|
# The value of this field is only available for chat administrators.
|
16
17
|
# @attr sticker_set_id [Integer] Identifier of the supergroup sticker set; 0 if none.
|
17
18
|
# @attr invite_link [String] Invite link for this chat.
|
18
|
-
# @attr pinned_message_id [Integer] Identifier of the pinned message in the chat; 0 if none.
|
19
19
|
# @attr upgraded_from_basic_group_id [Integer] Identifier of the basic group from which supergroup was upgraded; 0 if
|
20
20
|
# none.
|
21
21
|
# @attr upgraded_from_max_message_id [Integer] Identifier of the last message in the basic group from which
|
@@ -29,10 +29,10 @@ module TD::Types
|
|
29
29
|
attribute :can_get_members, TD::Types::Bool
|
30
30
|
attribute :can_set_username, TD::Types::Bool
|
31
31
|
attribute :can_set_sticker_set, TD::Types::Bool
|
32
|
+
attribute :can_view_statistics, TD::Types::Bool
|
32
33
|
attribute :is_all_history_available, TD::Types::Bool
|
33
34
|
attribute :sticker_set_id, TD::Types::Integer
|
34
35
|
attribute :invite_link, TD::Types::String
|
35
|
-
attribute :pinned_message_id, TD::Types::Integer
|
36
36
|
attribute :upgraded_from_basic_group_id, TD::Types::Integer
|
37
37
|
attribute :upgraded_from_max_message_id, TD::Types::Integer
|
38
38
|
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# Returns contacts of the user, which are members of the supergroup or channel.
|
3
|
+
#
|
4
|
+
# @attr query [String] Query to search for.
|
5
|
+
class SupergroupMembersFilter::Contacts < SupergroupMembersFilter
|
6
|
+
attribute :query, TD::Types::String
|
7
|
+
end
|
8
|
+
end
|
@@ -2,7 +2,7 @@ module TD::Types
|
|
2
2
|
# Contains Telegram terms of service.
|
3
3
|
#
|
4
4
|
# @attr text [TD::Types::FormattedText] Text of the terms of service.
|
5
|
-
# @attr min_user_age [Integer]
|
5
|
+
# @attr min_user_age [Integer] Minimum age of a user to be able to accept the terms; 0 if any.
|
6
6
|
# @attr show_popup [Boolean] True, if a blocking popup with terms of service must be shown to the user.
|
7
7
|
class TermsOfService < Base
|
8
8
|
attribute :text, TD::Types::FormattedText
|
data/lib/tdlib/types/update.rb
CHANGED
@@ -15,6 +15,7 @@ module TD::Types
|
|
15
15
|
new_chat
|
16
16
|
chat_title
|
17
17
|
chat_photo
|
18
|
+
chat_permissions
|
18
19
|
chat_last_message
|
19
20
|
chat_order
|
20
21
|
chat_is_pinned
|
@@ -26,8 +27,14 @@ module TD::Types
|
|
26
27
|
chat_unread_mention_count
|
27
28
|
chat_notification_settings
|
28
29
|
scope_notification_settings
|
30
|
+
chat_pinned_message
|
29
31
|
chat_reply_markup
|
30
32
|
chat_draft_message
|
33
|
+
chat_online_member_count
|
34
|
+
notification
|
35
|
+
notification_group
|
36
|
+
active_notifications
|
37
|
+
have_pending_notifications
|
31
38
|
delete_messages
|
32
39
|
user_chat_action
|
33
40
|
user_status
|
@@ -52,6 +59,7 @@ module TD::Types
|
|
52
59
|
recent_stickers
|
53
60
|
favorite_stickers
|
54
61
|
saved_animations
|
62
|
+
selected_background
|
55
63
|
language_pack_strings
|
56
64
|
connection_state
|
57
65
|
terms_of_service
|
@@ -63,6 +71,7 @@ module TD::Types
|
|
63
71
|
new_pre_checkout_query
|
64
72
|
new_custom_event
|
65
73
|
new_custom_query
|
74
|
+
poll
|
66
75
|
].each do |type|
|
67
76
|
autoload TD::Types.camelize(type), "tdlib/types/update/#{type}"
|
68
77
|
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# Contains active notifications that was shown on previous application launches.
|
3
|
+
# This update is sent only if a message database is used.
|
4
|
+
# In that case it comes once before any updateNotification and updateNotificationGroup update.
|
5
|
+
#
|
6
|
+
# @attr groups [Array<TD::Types::NotificationGroup>] Lists of active notification groups.
|
7
|
+
class Update::ActiveNotifications < Update
|
8
|
+
attribute :groups, TD::Types::Array.of(TD::Types::NotificationGroup)
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# The number of online group members has changed.
|
3
|
+
# This update with non-zero count is sent only for currently opened chats.
|
4
|
+
# There is no guarantee that it will be sent just after the count has changed.
|
5
|
+
#
|
6
|
+
# @attr chat_id [Integer] Identifier of the chat.
|
7
|
+
# @attr online_member_count [Integer] New number of online members in the chat, or 0 if unknown.
|
8
|
+
class Update::ChatOnlineMemberCount < Update
|
9
|
+
attribute :chat_id, TD::Types::Integer
|
10
|
+
attribute :online_member_count, TD::Types::Integer
|
11
|
+
end
|
12
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module TD::Types
|
2
|
-
# The order of the chat in the
|
2
|
+
# The order of the chat in the chat list has changed.
|
3
3
|
# Instead of this update updateChatLastMessage, updateChatIsPinned or updateChatDraftMessage might be sent.
|
4
4
|
#
|
5
5
|
# @attr chat_id [Integer] Chat identifier.
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# Chat permissions was changed.
|
3
|
+
#
|
4
|
+
# @attr chat_id [Integer] Chat identifier.
|
5
|
+
# @attr permissions [TD::Types::ChatPermissions] The new chat permissions.
|
6
|
+
class Update::ChatPermissions < Update
|
7
|
+
attribute :chat_id, TD::Types::Integer
|
8
|
+
attribute :permissions, TD::Types::ChatPermissions
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# The chat pinned message was changed.
|
3
|
+
#
|
4
|
+
# @attr chat_id [Integer] Chat identifier.
|
5
|
+
# @attr pinned_message_id [Integer] The new identifier of the pinned message; 0 if there is no pinned message in the
|
6
|
+
# chat.
|
7
|
+
class Update::ChatPinnedMessage < Update
|
8
|
+
attribute :chat_id, TD::Types::Integer
|
9
|
+
attribute :pinned_message_id, TD::Types::Integer
|
10
|
+
end
|
11
|
+
end
|
@@ -4,7 +4,7 @@ module TD::Types
|
|
4
4
|
# @attr chat_id [Integer] Chat identifier.
|
5
5
|
# @attr message_ids [Array<Integer>] Identifiers of the deleted messages.
|
6
6
|
# @attr is_permanent [Boolean] True, if the messages are permanently deleted by a user (as opposed to just becoming
|
7
|
-
#
|
7
|
+
# inaccessible).
|
8
8
|
# @attr from_cache [Boolean] True, if the messages are deleted only from the cache and can possibly be retrieved
|
9
9
|
# again in the future.
|
10
10
|
class Update::DeleteMessages < Update
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# Describes, whether there are some pending notification updates.
|
3
|
+
# Can be used to prevent application from killing, while there are some pending notifications.
|
4
|
+
#
|
5
|
+
# @attr have_delayed_notifications [Boolean] True, if there are some delayed notification updates, which will be sent
|
6
|
+
# soon.
|
7
|
+
# @attr have_unreceived_notifications [Boolean] True, if there can be some yet unreceived notifications, which are
|
8
|
+
# being fetched from the server.
|
9
|
+
class Update::HavePendingNotifications < Update
|
10
|
+
attribute :have_delayed_notifications, TD::Types::Bool
|
11
|
+
attribute :have_unreceived_notifications, TD::Types::Bool
|
12
|
+
end
|
13
|
+
end
|
@@ -3,7 +3,7 @@ module TD::Types
|
|
3
3
|
# Be aware that some messages being sent can be irrecoverably deleted, in which case updateDeleteMessages will be
|
4
4
|
# received instead of this update.
|
5
5
|
#
|
6
|
-
# @attr message [TD::Types::Message] Contains information about the message
|
6
|
+
# @attr message [TD::Types::Message] Contains information about the message which failed to send.
|
7
7
|
# @attr old_message_id [Integer] The previous temporary message identifier.
|
8
8
|
# @attr error_code [Integer] An error code.
|
9
9
|
# @attr error_message [String] Error message.
|
@@ -2,11 +2,7 @@ module TD::Types
|
|
2
2
|
# A new message was received; can also be an outgoing message.
|
3
3
|
#
|
4
4
|
# @attr message [TD::Types::Message] The new message.
|
5
|
-
# @attr disable_notification [Boolean] True, if this message must not generate a notification.
|
6
|
-
# @attr contains_mention [Boolean] True, if the message contains a mention of the current user.
|
7
5
|
class Update::NewMessage < Update
|
8
6
|
attribute :message, TD::Types::Message
|
9
|
-
attribute :disable_notification, TD::Types::Bool
|
10
|
-
attribute :contains_mention, TD::Types::Bool
|
11
7
|
end
|
12
8
|
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# A notification was changed.
|
3
|
+
#
|
4
|
+
# @attr notification_group_id [Integer] Unique notification group identifier.
|
5
|
+
# @attr notification [TD::Types::Notification] Changed notification.
|
6
|
+
class Update::Notification < Update
|
7
|
+
attribute :notification_group_id, TD::Types::Integer
|
8
|
+
attribute :notification, TD::Types::Notification
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# A list of active notifications in a notification group has changed.
|
3
|
+
#
|
4
|
+
# @attr notification_group_id [Integer] Unique notification group identifier.
|
5
|
+
# @attr type [TD::Types::NotificationGroupType] New type of the notification group.
|
6
|
+
# @attr chat_id [Integer] Identifier of a chat to which all notifications in the group belong.
|
7
|
+
# @attr notification_settings_chat_id [Integer] Chat identifier, which notification settings must be applied to the
|
8
|
+
# added notifications.
|
9
|
+
# @attr is_silent [Boolean] True, if the notifications should be shown without sound.
|
10
|
+
# @attr total_count [Integer] Total number of unread notifications in the group, can be bigger than number of active
|
11
|
+
# notifications.
|
12
|
+
# @attr added_notifications [Array<TD::Types::Notification>] List of added group notifications, sorted by
|
13
|
+
# notification ID.
|
14
|
+
# @attr removed_notification_ids [Array<Integer>] Identifiers of removed group notifications, sorted by notification
|
15
|
+
# ID.
|
16
|
+
class Update::NotificationGroup < Update
|
17
|
+
attribute :notification_group_id, TD::Types::Integer
|
18
|
+
attribute :type, TD::Types::NotificationGroupType
|
19
|
+
attribute :chat_id, TD::Types::Integer
|
20
|
+
attribute :notification_settings_chat_id, TD::Types::Integer
|
21
|
+
attribute :is_silent, TD::Types::Bool
|
22
|
+
attribute :total_count, TD::Types::Integer
|
23
|
+
attribute :added_notifications, TD::Types::Array.of(TD::Types::Notification)
|
24
|
+
attribute :removed_notification_ids, TD::Types::Array.of(TD::Types::Integer)
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# The selected background has changed.
|
3
|
+
#
|
4
|
+
# @attr for_dark_theme [Boolean] True, if background for dark theme has changed.
|
5
|
+
# @attr background [TD::Types::Background, nil] The new selected background; may be null.
|
6
|
+
class Update::SelectedBackground < Update
|
7
|
+
attribute :for_dark_theme, TD::Types::Bool
|
8
|
+
attribute :background, TD::Types::Background.optional.default(nil)
|
9
|
+
end
|
10
|
+
end
|
data/lib/tdlib/types/user.rb
CHANGED
@@ -11,12 +11,14 @@ module TD::Types
|
|
11
11
|
# @attr outgoing_link [TD::Types::LinkState] Relationship from the current user to the other user.
|
12
12
|
# @attr incoming_link [TD::Types::LinkState] Relationship from the other user to the current user.
|
13
13
|
# @attr is_verified [Boolean] True, if the user is verified.
|
14
|
+
# @attr is_support [Boolean] True, if the user is Telegram support account.
|
14
15
|
# @attr restriction_reason [String] If non-empty, it contains the reason why access to this user must be restricted.
|
15
16
|
# The format of the string is "{type}: {description}".
|
16
17
|
# {type} contains the type of the restriction and at least one of the suffixes "-all", "-ios", "-android", or
|
17
18
|
# "-wp", which describe the platforms on which access should be restricted.
|
18
19
|
# (For example, "terms-ios-android".
|
19
20
|
# {description} contains a human-readable description of the restriction, which can be shown to the user).
|
21
|
+
# @attr is_scam [Boolean] True, if many users reported this user as a scam.
|
20
22
|
# @attr have_access [Boolean] If false, the user is inaccessible, and the only information known about the user is
|
21
23
|
# inside this class.
|
22
24
|
# It can't be passed to any method except GetUser.
|
@@ -33,7 +35,9 @@ module TD::Types
|
|
33
35
|
attribute :outgoing_link, TD::Types::LinkState
|
34
36
|
attribute :incoming_link, TD::Types::LinkState
|
35
37
|
attribute :is_verified, TD::Types::Bool
|
38
|
+
attribute :is_support, TD::Types::Bool
|
36
39
|
attribute :restriction_reason, TD::Types::String
|
40
|
+
attribute :is_scam, TD::Types::Bool
|
37
41
|
attribute :have_access, TD::Types::Bool
|
38
42
|
attribute :type, TD::Types::UserType
|
39
43
|
attribute :language_code, TD::Types::String
|
@@ -3,8 +3,11 @@ module TD::Types
|
|
3
3
|
class UserPrivacySetting < Base
|
4
4
|
%w[
|
5
5
|
show_status
|
6
|
+
show_profile_photo
|
7
|
+
show_link_in_forwarded_messages
|
6
8
|
allow_chat_invites
|
7
9
|
allow_calls
|
10
|
+
allow_peer_to_peer_calls
|
8
11
|
].each do |type|
|
9
12
|
autoload TD::Types.camelize(type), "tdlib/types/user_privacy_setting/#{type}"
|
10
13
|
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# Contains full information about a user profile photo.
|
3
|
+
#
|
4
|
+
# @attr id [Integer] Unique user profile photo identifier.
|
5
|
+
# @attr added_date [Integer] Point in time (Unix timestamp) when the photo has been added.
|
6
|
+
# @attr sizes [Array<TD::Types::PhotoSize>] Available variants of the user photo, in different sizes.
|
7
|
+
class UserProfilePhoto < Base
|
8
|
+
attribute :id, TD::Types::Integer
|
9
|
+
attribute :added_date, TD::Types::Integer
|
10
|
+
attribute :sizes, TD::Types::Array.of(TD::Types::PhotoSize)
|
11
|
+
end
|
12
|
+
end
|