-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from southbridgeio/develop
Update tdlib version (#34)
- Loading branch information
Showing
126 changed files
with
1,052 additions
and
256 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
lib/tdlib/types/authorization_state/wait_other_device_confirmation.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module TD::Types | ||
# The user needs to confirm authorization on another logged in device by scanning a QR code with the provided link. | ||
# | ||
# @attr link [String] A tg:// URL for the QR code. | ||
# The link will be updated frequently. | ||
class AuthorizationState::WaitOtherDeviceConfirmation < AuthorizationState | ||
attribute :link, TD::Types::String | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
module TD::Types | ||
# TDLib needs the user's phone number to authorize. | ||
# Call `setAuthenticationPhoneNumber` to provide the phone number, or use `requestQrCodeAuthentication`, or | ||
# `checkAuthenticationBotToken` for other authentication options. | ||
class AuthorizationState::WaitPhoneNumber < AuthorizationState | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module TD::Types | ||
# Describes a fill of a background. | ||
class BackgroundFill < Base | ||
%w[ | ||
solid | ||
gradient | ||
].each do |type| | ||
autoload TD::Types.camelize(type), "tdlib/types/background_fill/#{type}" | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module TD::Types | ||
# Describes a gradient fill of a background. | ||
# | ||
# @attr top_color [Integer] A top color of the background in the RGB24 format. | ||
# @attr bottom_color [Integer] A bottom color of the background in the RGB24 format. | ||
# @attr rotation_angle [Integer] Clockwise rotation angle of the gradient, in degrees; 0-359. | ||
# Should be always divisible by 45. | ||
class BackgroundFill::Gradient < BackgroundFill | ||
attribute :top_color, TD::Types::Integer | ||
attribute :bottom_color, TD::Types::Integer | ||
attribute :rotation_angle, TD::Types::Integer | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module TD::Types | ||
# Describes a solid fill of a background. | ||
# | ||
# @attr color [Integer] A color of the background in the RGB24 format. | ||
class BackgroundFill::Solid < BackgroundFill | ||
attribute :color, TD::Types::Integer | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module TD::Types | ||
# A filled background. | ||
# | ||
# @attr fill [TD::Types::BackgroundFill] Description of the background fill. | ||
class BackgroundType::Fill < BackgroundType | ||
attribute :fill, TD::Types::BackgroundFill | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
module TD::Types | ||
# A PNG pattern to be combined with the color chosen by the user. | ||
# A PNG or TGV (gzipped subset of SVG with MIME type "application/x-tgwallpattern") pattern to be combined with the | ||
# background fill chosen by the user. | ||
# | ||
# @attr is_moving [Boolean] True, if the background needs to be slightly moved when device is rotated. | ||
# @attr color [Integer] Main color of the background in RGB24 format. | ||
# @attr intensity [Integer] Intensity of the pattern when it is shown above the main background color, 0-100. | ||
# @attr fill [TD::Types::BackgroundFill] Description of the background fill. | ||
# @attr intensity [Integer] Intensity of the pattern when it is shown above the filled background, 0-100. | ||
# @attr is_moving [Boolean] True, if the background needs to be slightly moved when device is tilted. | ||
class BackgroundType::Pattern < BackgroundType | ||
attribute :is_moving, TD::Types::Bool | ||
attribute :color, TD::Types::Integer | ||
attribute :fill, TD::Types::BackgroundFill | ||
attribute :intensity, TD::Types::Integer | ||
attribute :is_moving, TD::Types::Bool | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module TD::Types | ||
# Represents result of checking whether the current session can be used to transfer a chat ownership to another user. | ||
class CanTransferOwnershipResult < Base | ||
%w[ | ||
ok | ||
password_needed | ||
password_too_fresh | ||
session_too_fresh | ||
].each do |type| | ||
autoload TD::Types.camelize(type), "tdlib/types/can_transfer_ownership_result/#{type}" | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module TD::Types | ||
# The session can be used. | ||
class CanTransferOwnershipResult::Ok < CanTransferOwnershipResult | ||
end | ||
end |
5 changes: 5 additions & 0 deletions
5
lib/tdlib/types/can_transfer_ownership_result/password_needed.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module TD::Types | ||
# The 2-step verification needs to be enabled first. | ||
class CanTransferOwnershipResult::PasswordNeeded < CanTransferOwnershipResult | ||
end | ||
end |
8 changes: 8 additions & 0 deletions
8
lib/tdlib/types/can_transfer_ownership_result/password_too_fresh.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module TD::Types | ||
# The 2-step verification was enabled recently, user needs to wait. | ||
# | ||
# @attr retry_after [Integer] Time left before the session can be used to transfer ownership of a chat, in seconds. | ||
class CanTransferOwnershipResult::PasswordTooFresh < CanTransferOwnershipResult | ||
attribute :retry_after, TD::Types::Integer | ||
end | ||
end |
8 changes: 8 additions & 0 deletions
8
lib/tdlib/types/can_transfer_ownership_result/session_too_fresh.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module TD::Types | ||
# The session was created recently, user needs to wait. | ||
# | ||
# @attr retry_after [Integer] Time left before the session can be used to transfer ownership of a chat, in seconds. | ||
class CanTransferOwnershipResult::SessionTooFresh < CanTransferOwnershipResult | ||
attribute :retry_after, TD::Types::Integer | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module TD::Types | ||
# Describes actions which should be possible to do through a chat action bar. | ||
class ChatActionBar < Base | ||
%w[ | ||
report_spam | ||
report_unrelated_location | ||
report_add_block | ||
add_contact | ||
share_phone_number | ||
].each do |type| | ||
autoload TD::Types.camelize(type), "tdlib/types/chat_action_bar/#{type}" | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module TD::Types | ||
# The chat is a private or secret chat and the other user can be added to the contact list using the method | ||
# addContact. | ||
class ChatActionBar::AddContact < ChatActionBar | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module TD::Types | ||
# The chat is a private or secret chat, which can be reported using the method reportChat, or the other user can be | ||
# added to the contact list using the method addContact, or the other user can be blocked using the method blockUser. | ||
class ChatActionBar::ReportAddBlock < ChatActionBar | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module TD::Types | ||
# The chat can be reported as spam using the method reportChat with the reason chatReportReasonSpam. | ||
class ChatActionBar::ReportSpam < ChatActionBar | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module TD::Types | ||
# The chat is a location-based supergroup, which can be reported as having unrelated location using the method | ||
# reportChat with the reason chatReportReasonUnrelatedLocation. | ||
class ChatActionBar::ReportUnrelatedLocation < ChatActionBar | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module TD::Types | ||
# The chat is a private or secret chat with a mutual contact and the user's phone number can be shared with the other | ||
# user using the method sharePhoneNumber. | ||
class ChatActionBar::SharePhoneNumber < ChatActionBar | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module TD::Types | ||
# Contains information about a chat administrator. | ||
# | ||
# @attr user_id [Integer] User identifier of the administrator. | ||
# @attr custom_title [String] Custom title of the administrator. | ||
# @attr is_owner [Boolean] True, if the user is the owner of the chat. | ||
class ChatAdministrator < Base | ||
attribute :user_id, TD::Types::Integer | ||
attribute :custom_title, TD::Types::String | ||
attribute :is_owner, TD::Types::Bool | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module TD::Types | ||
# Represents a list of chat administrators. | ||
# | ||
# @attr administrators [Array<TD::Types::ChatAdministrator>] A list of chat administrators. | ||
class ChatAdministrators < Base | ||
attribute :administrators, TD::Types::Array.of(TD::Types::ChatAdministrator) | ||
end | ||
end |
Oops, something went wrong.