Changes in 1.4.0:
- Added a TDLib build instructions generator, covering in details TDLib building on the most popular operating systems.
- Added an example of TDLib building and usage from a browser. See https://github.com/tdlib/td/blob/master/example/web/ for more details.
- Allowed to pass NULL pointer to
td_json_client_executeinstead of a previously created JSON client. Now you can use synchronous TDLib methods through a JSON interface before creating a TDLib JSON client. - Added support for media streaming by allowing to download any part of a file:
- Added the
offsetparameter todownloadFilewhich specifies the starting position from which the file should be downloaded. - Added the
limitparameter todownloadFilewhich specifies how many bytes should be downloaded starting from theoffsetposition. - Added the field
download_offsetto the classlocalFilewhich contains the current download offset. - The field
downloaded_prefix_sizeof thelocalFileclass now contains the number of available bytes from the positiondownload_offsetinstead of from the beginning of the file. - Added the method
getFileDownloadedPrefixSizewhich can be used to get the number of locally available file bytes from a given offset without actually changing the download offset.
- Added the
- Added the parameter
synchronoustodownloadFilewhich causes the request to return the result only after the download is completed. - Added support for native polls in messages:
- Added
messagePollto the types of message content; contains a poll. - Added the classes
pollandpollOptiondescribing a poll and a poll answer option respectively. - Added
inputMessagePollto the types of new input message content; can be used to send a poll. - Added the method
setPollAnswerwhich can be used for voting in polls. - Added the method
stopPollwhich can be used to stop polls. Use theMessage.can_be_editedfield to check whether this method can be called on a message. - Added the update
updatePollfor bots only. Ordinary users receive poll updates throughupdateMessageContent.
- Added
- Added a Notification API. See article https://core.telegram.org/tdlib/notification-api for a detailed description.
- Added the class
pushReceiverIdwhich contains a globally unique identifier of the push notification subscription. - Changed the return type of the method
registerDevicetopushReceiverIdto allow matching of push notifications with TDLib instances. - Removed the fields
disable_notificationandcontains_mentionfromupdateNewMessage. - Renamed the class
deviceTokenGoogleCloudMessagingtodeviceTokenFirebaseCloudMessaging. - Added the field
encryptto classesdeviceTokenApplePushVoIPanddeviceTokenFirebaseCloudMessagingwhich allows to subscribe for end-to-end encrypted push notifications. - Added the option
notification_group_count_maxwhich can be used to enable the Notification API and set the maximum number of notification groups to be shown simultaneously. - Added the option
notification_group_size_maxwhich can be used to set the maximum number of simultaneously shown notifications in a group. - Added the synchronous method
getPushReceiverIdfor matching a push notification with a TDLib instance. - Added the method
processPushNotificationfor handling of push notifications. - Removed the method
processDcUpdatein favor of the generalprocessPushNotificationmethod. - Added the update
updateNotificationGroup, sent whenever a notification group changes. - Added the update
updateNotification, sent whenever a notification changes. - Added the update
updateActiveNotificationsfor syncing the list of active notifications on startup. - Added the update
updateHavePendingNotificationswhich can be used to improve lifetime handling of the TDLib instance. - Added the possibility to disable special handling of notifications about pinned messages via the new settings
use_default_disable_pinned_message_notifications,disable_pinned_message_notificationsin the classchatNotificationSettingsand the new settingdisable_pinned_message_notificationsin the classscopeNotificationSettings. - Added the possibility to disable special handling of notifications about mentions and replies via the new settings
use_default_disable_mention_notifications,disable_mention_notificationsin the classchatNotificationSettingsand the new settingdisable_mention_notificationsin the classscopeNotificationSettings. - Added the class
PushMessageContentdescribing the content of a notification, received through a push notification. - Added the class
NotificationTypedescribing a type of a notification. - Added the class
notificationcontaining information about a notification. - Added the class
NotificationGroupTypedescribing a type of a notification group. - Added the class
notificationGroupdescribing a state of a notification group. - Added the methods
removeNotificationandremoveNotificationGroupfor handling notifications removal by the user. - Added the separate notification scope
notificationSettingsScopeChannelChatsfor channel chats.
- Added the class
- Added support for pinned notifications in basic groups and Saved Messages:
- Added the field
pinned_message_idto the classchat. - Removed the field
pinned_message_idfrom the classsupergroupFullInfoin favor ofChat.pinned_message_id. - Added the update
updateChatPinnedMessage. - The right
can_pin_messagesis now applicable to both basic groups and supergroups. - Replaced the method
pinSupergroupMessagewithpinChatMessagewhich can be used for any chat type. - Replaced the method
unpinSupergroupMessagewithunpinChatMessagewhich can be used for any chat type.
- Added the field
- Added new synchronous methods for managing TDLib internal logging. The old functions are deprecated and
will be removed in TDLib 2.0.0.
- Added the synchronous method
setLogStreamfor changing the stream to which the TDLib internal log is written. - Added the synchronous method
getLogStreamfor getting information about the currently used log stream. - Added the classes
logStreamDefault,logStreamFileandlogStreamEmptydescribing different supported kinds of log streams. - Added the class
logVerbosityLevelcontaining the verbosity level of the TDLib internal log. - Added the class
logTagscontaining a list of available TDLib internal log tags. - Added the synchronous method
setLogVerbosityLevelfor changing verbosity level of logging. - Added the synchronous method
getLogVerbosityLevelfor getting the current verbosity level of logging. - Added the synchronous method
getLogTagsreturning all currently supported log tags. - Added the synchronous method
setLogTagVerbosityLevelfor changing the verbosity level of logging for some specific part of the code. - Added the synchronous method
getLogTagVerbosityLevelfor getting the current verbosity level for a specific part of the code. - Added the synchronous method
addLogMessagefor using the TDLib internal log by the application.
- Added the synchronous method
- Added support for Instant View 2.0:
- Replaced the field
has_instant_viewin classwebPagewith theinstant_view_versionfield. - Added the field
versionto the classwebPageInstantView. - Added the class
pageBlockCaption. - Changed the type of
captionfields inpageBlockAnimation,pageBlockAudio,pageBlockPhoto,pageBlockVideo,pageBlockEmbedded,pageBlockEmbeddedPost,pageBlockCollageandpageBlockSlideshowfromRichTexttopageBlockCaption. - Added the class
pageBlockListItemand replaced the content of thepageBlockListclass with a list ofpageBlockListItem. - Added 6 new kinds of
RichText:richTextSubscript,richTextSuperscript,richTextMarked,richTextPhoneNumber,richTextIconandrichTextAnchor. - Added new classes
pageBlockRelatedArticle,PageBlockHorizontalAlignment,PageBlockVerticalAlignmentandpageBlockTableCell. - Added new block types
pageBlockKicker,pageBlockRelatedArticles,pageBlockTable,pageBlockDetailsandpageBlockMap. - Added the flag
is_rtltowebPageInstantViewobject. - Renamed the field
captionin classespageBlockBlockQuoteandpageBlockPullQuotetocredit. - Dimensions in
pageBlockEmbeddedcan now be unknown. - Added the field
urltopageBlockPhotowhich contains a URL that needs to be opened when the photo is clicked. - Added the field
urltowebPageInstantViewwhich must be used for the correct handling of anchors.
- Replaced the field
- Added methods for confirmation of the 2-step verification recovery email address:
- Added the method
checkRecoveryEmailAddressCodefor checking the verification code. - Added the method
resendRecoveryEmailAddressCodefor resending the verification code. - Replaced the field
unconfirmed_recovery_email_address_patternin the classpasswordStatewith therecovery_email_address_code_infofield containing full information about the code. - The necessity of recovery email address confirmation in
setPasswordandsetRecoveryEmailAddressmethods is now returned by the correspondingpasswordStateand not by the errorEMAIL_UNCONFIRMED.
- Added the method
- Improved the
MessageForwardInfoclass and added support for hidden original senders:- Removed the old
messageForwardedPostandmessageForwardedFromUserclasses. - Added the class
messageForwardInfowhich contains information about the origin of the message, original sending date and identifies the place from which the message was forwarded the last time for messages forwarded to Saved Messages. - Added the classes
messageForwardOriginUser,messageForwardOriginHiddenUserandmessageForwardOriginChannelwhich describe the exact origins of a message.
- Removed the old
- Improved getting the list of user profile photos:
- Added the class
userProfilePhoto, containingid,added_dateandsizesof a profile photo. - Changed the type of the field
photosinuserProfilePhotosto a list ofuserProfilePhotoinstead of a list ofphoto.getUserProfilePhotosnow returns a date for each profile photo. - Removed the field
idfrom the classphoto(this field was only needed in the result ofgetUserProfilePhotos).
- Added the class
- Added the possibility to get a Telegram Passport authorization form before asking the user for a password:
- Removed the parameter
passwordfrom the methodgetPassportAuthorizationForm. - Moved the fields
elementsanderrorsfrom the classpassportAuthorizationFormto the new classpassportElementsWithErrors. - Added the method
getPassportAuthorizationFormAvailableElementsthat takes the user's password and returns previously uploaded Telegram Passport elements and errors in them.
- Removed the parameter
- Added the field
file_indexto the classespassportElementErrorSourceFileandpassportElementErrorSourceTranslationFile. - Added the method
getCurrentStatereturning all updates describing the currentTDLibstate. It can be used to restore the correct state after connecting to a running TDLib instance. - Added the class
updateswhich contains a list of updates and is returned by thegetCurrentStatemethod. - Added the update
updateChatOnlineMemberCountwhich is automatically sent for open group chats if the number of online members in a group changes. - Added support for custom language packs downloaded from the server:
- Added the fields
base_language_pack_id`` to thelanguagePackInfo` object. Strings from the base language pack must be used for untranslated keys from the chosen language pack. - Added the fields
plural_code,is_official,is_rtl,is_beta,is_installed,total_string_count,translated_string_count,translation_urlto thelanguagePackInfoobject. - Added the method
addCustomServerLanguagePackwhich adds a custom server language pack to the list of installed language packs. - Added the method
getLanguagePackInfowhich can be used for handlinghttps://t.me/setlanguage/...links. - Added the method
synchronizeLanguagePackwhich can be used to fetch the latest versions of all strings from a language pack. The method doesn't need to be called explicitly for the current used/base language packs. - The method
deleteLanguagePacknow also removes the language pack from the list of installed language packs.
- Added the fields
- Added the method
getChatNotificationSettingsExceptionswhich can be used to get chats with non-default notification settings. - Added the parameter
hide_via_bottosendInlineQueryResultMessagewhich can be used forgetOption("animation_search_bot_username"),getOption("photo_search_bot_username")andgetOption("venue_search_bot_username")bots to hide that the message was sent via the bot. - Added the class
chatReportReasonChildAbusewhich can be used to report a chat for child abuse. - Added the method
getMessageLocallywhich returns a message only if it is available locally without a network request. - Added the method
writeGeneratedFilePartwhich can be used to write a generated file if there is no direct access to TDLib's file system. - Added the method
readFilePartwhich can be used to read a file from the TDLib file cache. - Added the class
filePartto represent the result of the newreadFilePartmethod. - Added the field
log_sizeto thestorageStatisticsFastclass which contains the size of the TDLib internal log. Previously the size was included into the value of thedatabase_sizefield. - Added the field
language_pack_database_sizeto thestorageStatisticsFastclass which contains the size of the language pack database. - Added the field
is_supportto the classuserwhich can be used to identify Telegram Support accounts. - Added the class
HttpUrlencapsulating an HTTP URL. - Added the method
getMessageLinkwhich can be used to create a private link (which works only for members) to a message in a supergroup or channel. - Added support for channel statistics (coming soon):
- Added the field
can_view_statisticsto thesupergroupFullInfoclass. - Added the method
getChatStatisticsUrlwhich returns a URL with the chat statistics.
- Added the field
- Added support for server-side peer-to-peer calls privacy:
- Added the class
userPrivacySettingAllowPeerToPeerCallsfor managing privacy. - Added the field
allow_p2ptocallStateReadyclass which must be used to determine whether a peer-to-peer connection can be used.
- Added the class
- Added the option
ignore_background_updateswhich allows to skip all updates received while the TDLib instance was not running. The option does nothing if the database or secret chats are used. - Added the read-only option
expect_blocking, suggesting whether Telegram is blocked for the user. - Added the read-only option
enabled_proxy_id, containing the ID of the enabled proxy. - Added the ability to identify password pending sessions (where the code was entered but not
the two-step verification password) via the flag
is_password_pendingin thesessionclass. TDLib guarantees that the sessions will be returned by thegetActiveSessionsmethod in the correct order. - Added the classes
JsonValueandjsonObjectMemberwhich represent a JSON value and a member of a JSON object respectively as TDLib API objects. - Added the synchronous methods
getJsonValueandgetJsonStringfor simple conversion between a JSON-encoded string andJsonValueTDLib API class. - Added the methods
getApplicationConfigandsaveApplicationLogEventto be used for testing purposes. - Added the temporarily class
databaseStatisticsand the methodgetDatabaseStatisticsfor rough estimations of database tables size in a human-readable format. - Made the method
Client.Executestatic in .NET interface. - Removed the
on_closedcallback virtual method from low-level C++ ClientActor interface. Callback destructor can be used instead. - Updated dependencies in the prebuilt TDLib for Android:
- Updated SDK to SDK 28 in which helper classes was moved from
android.support.toandroidx.package. - Updated NDK to r19c, which dropped support for Android versions up to 4.0.4, so the minimum supported version is Android 4.1.
- Updated OpenSSL to version 1.1.1.
- Added x86_64 libraries.
- Updated SDK to SDK 28 in which helper classes was moved from
- Added out of the box
FreeBSDsupport. - Significantly improved TDLib compilation time and decreased compiler RAM usage:
- In native C++ interface
td_api::object_ptris now a simple homebrew const-propagating class instead ofstd::unique_ptr. - Added the script
SplitSource.php, which can be used to split some source code files before building the library to reduce maximum RAM usage per file at the expense of increased build time.
- In native C++ interface
- The update
updateOptionwith theversionoption is now guaranteed to come before all other updates. It can now be used to dynamically discover available methods. - Added the ability to delete incoming messages in private chats and revoke messages without a time limit:
- Added the parameter
revoketo the methoddeleteChatHistory; use it to delete chat history for all chat members. - Added the fields
can_be_deleted_only_for_selfandcan_be_deleted_for_all_userstoChatobject which can be used to determine for whom the chat can be deleted through thedeleteChatHistorymethod. - The fields
Message.can_be_deleted_only_for_selfandMessage.can_be_deleted_for_all_userscan still be used to determine for whom the message can be deleted through thedeleteMessagesmethod.
- Added the parameter
- Added support for server-generated notifications about newly registered contacts:
- Setting the option
disable_contact_registered_notificationsnow affects all user sessions. When the option is enabled, the client will still receivemessageContactRegisteredmessage in the private chat, but there will be no notification about the message. getOption("disable_contact_registered_notifications")can be used to fetch the actual value of the option, the option will not be updated automatically after a change from another device.
- Setting the option
- Decreased the maximum allowed first name and last name length to 64, chat title length to 128, matching the new server-side limits.
- Decreased the maximum allowed value of the
forward_limitparameter of theaddChatMembermethod from 300 to 100, matching the new server-side limit. - Added protection from opening two TDLib instances with the same database directory from one process.
- Added copying of notification settings of new secret chats from notification settings of the corresponding private chat.
- Excluded the sponsored chat (when using sponsored proxies) from unread counters.
- Allowed to pass decreased local_size in
setFileGenerationProgressto restart the generation from the beginning. - Added a check for modification time of original file in
inputFileGeneratedwhenever possible. If the original file was changed, then TDLib will restart the generation. - Added the destruction of MTProto keys on the server during log out.
- Added support for hexadecimal-encoded and decimal-encoded IPv4 proxy server addresses.
- Improved the behavior of
changeImportedContactswhich now also deletes contacts of users without Telegram accounts from the server. - Added the ability to call
getStorageStatisticsbefore authorization. - Allowed to pass
limit= -offsetfor negative offset in thegetChatHistorymethod. - Changed the recommended
inputThumbnailsize to be at most 320x320 instead of the previous 90x90. - Disabled building by default of the native C interface. Use
cmake --build . --target tdcto build it. - Numerous optimizations and bug fixes:
- Network implementation for Windows was completely rewritten to allow a literally unlimited number of simultaneously used TDLib instances.
- TDLib instances can now share working threads with each other. Only a limited number of threads will be created even if there are thousands of TDLib instances in a single process.
- Removed the restriction on the size of update or response result in JSON interface.
- Fixed pinning of the 5th chat when there is a sponsored chat.
- Fixed IPv6 on Windows.
- Improved network connections balancing, aliveness checks and overall stability.
- Various autogenerated documentation fixes and improvements.
Changes in 1.3.0:
- Added a review of existing TDLib based frameworks in different programming languages.
- Added a Getting started guide describing the main TDLib concepts and basic principles required for library usage.
- When a chat is opened, only those messages that have been viewed are marked as read.
- Improved the proxy settings API:
- A list of proxies is stored instead of just one proxy.
- New methods
addProxy,editProxy,enableProxy,disableProxy,removeProxyandgetProxieswere added instead ofsetProxyandgetProxy. - Added the method
pingProxywhich can be used to compute time needed to receive a response from a Telegram server through a proxy or directly. - Added support for MTProto proxy via class
proxyTypeMtproto. - Added support for HTTP proxy via class
proxyTypeHttp. - For each proxy last time it was used is remembered.
- Added the method
getProxyLinkwhich returns an HTTPS link that can be used to share a proxy with others.
- Improved the notification settings API. Scope notification settings are now properly synchronized between all devices
and chat notification settings can be reset to their default values:
- The
notificationSettingsclass was split intochatNotificationSettingsandscopeNotificationSettings. - Only two notification settings scopes are left:
notificationSettingsScopePrivateChatswhich is responsible for default notification settings for private and secret chats andnotificationSettingsScopeGroupChatsfor all other chats. updateNotificationSettingswas split intoupdateChatNotificationSettingsandupdateScopeNotificationSettings.setNotificationSettingswas split intosetChatNotificationSettingsandsetScopeNotificationSettings.getNotificationSettingswas replaced withgetScopeNotificationSettings.
- The
- Added the field
filterto thesearchChatMembersmethod to support searching among administrators, bots, restricted and banned members. - Added the ability to use synchronous requests and
setAlarmbefore the library is initialized. - Added the ability to send requests that don't need authentication before the library is initialized. These requests
will be postponed and executed at the earliest opportunity. For example,
setNetworkTypecan be used to disable the network for TDLib before the library tries to use it;addProxycan be used to add a proxy before any network activity; orsetOption("use_pfs")can be used to guarantee that PFS is used for all requests. - Added support for tg:// links in
inlineKeyboardButtonTypeUrlandtextEntityTypeTextUrl. - Added the ability to call
deleteAccountin theauthorizationStateWaitPasswordauthorization state. - Added the ability to call
checkAuthenticationCodewith an emptyfirst_namefor unregistered users to check the code validity. - Added the methods
editMessageMediaandeditInlineMessageMediafor editing media messages content. - Renamed the class
shippingAddresstoaddress. - Changed the return value of the
requestPasswordRecoverymethod frompasswordRecoveryInfotoemailAddressAuthenticationCodeInfo. - Added support for sponsored channels promoted by MTProto-proxies:
- Added the field
is_sponsoredto thechatclass. - Added
updateChatIsSponsored, sent when this field changes.
- Added the field
- Added support for marking chats as unread:
- Added the field
is_marked_as_unreadtochat. - Added the update
updateChatIsMarkedAsUnread. - Added the method
toggleChatIsMarkedAsUnread.
- Added the field
- Added support for a default value of
disable_notification, used when a message is sent to the chat:- Added the field
default_disable_notificationtochatclass. - Added the update
updateChatDefaultDisableNotification. - Added the method
toggleChatDefaultDisableNotification.
- Added the field
- Added the field
vcardto thecontactclass. - Added the field
typetovenue, which contains a provider-specific type of the venue, - Added the update
updateUnreadChatCount, enabled when the message database is used and sent when the number of unread chats has changed. - Added the method
addLocalMessagefor adding a local message to a chat. - Added the method
getDeepLinkInfo, which can return information abouttg://links that are not supported by the client. - Added support for language packs:
- Added the writable option
language_pack_database_pathwhich can be used to specify a path to a database for storing language pack strings, so that this database can be shared between different accounts. If not specified, language pack strings will be stored only in memory. Changes to the option are applied only on the next TDLib launch. - Added the writable option
localization_targetfor setting up a name for the current localization target (currently supported: "android", "android_x", "ios", "macos" and "tdesktop"). - Added the writable option
language_pack_idfor setting up an identifier of the currently used language pack from the current localization target (a "language pack" represents the collection of strings that can be used to display the interface of a particular application in a particular language). - Added the class
LanguagePackStringValuedescribing the possible values of a string from a language pack. - Added the class
languagePackStringdescribing a string from a language pack. - Added the class
languagePackStringscontaining a list of language pack strings. - Added the class
languagePackInfocontaining information about a language pack from a localization target. - Added the class
localizationTargetInfocontaining information about a localization target. - Added the update
updateLanguagePackStringswhich is sent when some strings in a language pack have changed. - Added the synchronous method
getLanguagePackStringwhich can be used to get a language pack string from the local database. - Added the method
getLocalizationTargetInfowhich returns information about the current localization target. - Added the method
getLanguagePackStringswhich returns some or all strings from a language pack, possibly fetching them from the server. - Added the method
setCustomLanguagePackfor adding or editing a custom language pack. - Added the method
editCustomLanguagePackInfofor editing information about a custom language pack. - Added the method
setCustomLanguagePackStringfor adding, editing or deleting a string in a custom language pack. - Added the method
deleteLanguagePackfor deleting a language pack from the database. - Added the read-only option
suggested_language_pack_idcontaining the identifier of the language pack, suggested for the user by the server.
- Added the writable option
- Added support for Telegram Passport:
- Added two new message contents
messagePassportDataSentfor ordinary users andmessagePassportDataReceivedfor bots containing information about Telegram Passport data shared with a bot. - Added the new file type
fileTypeSecure. - Added the class
datedFilecontaining information about a file along with the date it was uploaded. - Added the helper classes
date,personalDetails,identityDocument,inputIdentityDocument,personalDocument,inputPersonalDocument,passportElements. - Added the class
PassportElementTypedescribing all supported types of Telegram Passport elements. - Added the class
PassportElementcontaining information about a Telegram Passport element. - Added the class
InputPassportElementcontaining information about a Telegram Passport element to save. - Added the classes
passportElementErrorandPassportElementErrorSourcedescribing an error in a Telegram Passport element. - Added the field
has_passport_datato thepasswordStateclass. - Added the methods
getPassportElement,getAllPassportElements,setPassportElement,deletePassportElementfor managing Telegram Passport elements. - Added the methods
getPassportAuthorizationFormandsendPassportAuthorizationFormused for sharing Telegram Passport data with a service via a bot. - Added the methods
sendPhoneNumberVerificationCode,resendPhoneNumberVerificationCodeandcheckPhoneNumberVerificationCodefor verification of a phone number used for Telegram Passport. - Added the methods
sendEmailAddressVerificationCode,resendEmailAddressVerificationCodeandcheckEmailAddressVerificationCodefor verification of an email address used for Telegram Passport. - Added the method
getPreferredCountryLanguagereturning a most popular language in a country. - Added the classes
inputPassportElementErrorandInputPassportElementErrorSourcefor bots describing an error in a Telegram Passport element. - Added the method
setPassportElementErrorsfor bots. - Added the class
encryptedPassportElementandencryptedCredentialsfor bots describing an encrypted Telegram Passport element.
- Added two new message contents
- Improved support for Telegram terms of service:
- Added the class
termsOfService, containing information about the Telegram terms of service. - Added the field
terms_of_servicetoauthorizationStateWaitCode. - Added the update
updateTermsOfServicecoming when new terms of service need to be accepted by the user. - Added the method
acceptTermsOfServicefor accepting terms of service. - Removed the method
getTermsOfService.
- Added the class
- Added the method
getMapThumbnailFilewhich can be used to register and download a map thumbnail file. - Added the methods
sendPhoneNumberConfirmationCode,resendPhoneNumberConfirmationCodeandcheckPhoneNumberConfirmationCodewhich can be used to prevent an account from being deleted. - Added the convenience methods
joinChatandleaveChatwhich can be used instead ofsetChatMemberStatusto manage the current user's membership in a chat. - Added the convenience method
getContactswhich can be used instead ofsearchContactsto get all contacts. - Added the synchronous method
cleanFileNamewhich removes potentially dangerous characters from a file name. - Added the method
getChatMessageCountwhich can be used to get the number of shared media. - Added the writable option
ignore_inline_thumbnailswhich can be used to prevent file thumbnails sent by the server along with messages from being saved on the disk. - Added the writable option
prefer_ipv6which can be used to prefer IPv6 connections over IPv4. - Added the writable option
disable_top_chatswhich can be used to disable support for top chats. - Added the class
chatReportReasonCopyrightfor reporting chats containing infringing content. - Added the method
clearAllDraftMessageswhich can be used to delete all cloud drafts. - Added the read-only options
message_text_length_maxandmessage_caption_length_max. - Added the read-only options
animation_search_bot_username,photo_search_bot_usernameandvenue_search_bot_usernamecontaining usernames of bots which can be used in inline mode for animations, photos and venues search respectively. - Numerous optimizations and bug fixes:
- Fixed string encoding for C# binding.
- Fixed building TDLib SDK for Universal Windows Platform for ARM with MSVC 2017.
- Fixed the Swift example project.
- Fixed the syntax error in the Python example.
- Sticker thumbnails can now have
webpextensions if they are more likely to be in WEBP format.
Changes in 1.2.0:
- Added support for native .NET bindings through
C++/CLIandC++/CX. See using in .NET projects for more details. - Added a C# example. See README for build and usage instructions.
- Added a build and usage example of TDLib SDK for Universal Windows Platform. See README for detailed build and usage instructions. Also see Unigram, which is a full-featured client rewritten from scratch using TDLib SDK for Universal Windows Platform in less than 2 months.
- Added a Swift example. See README for build and usage instructions.
- Added an example of building TDLib for iOS, watchOS, tvOS, and also macOS. See README for detailed build instructions.
- Added README to C++ and python examples.
- Link Time Optimization is disabled by default. Use
-DTD_ENABLE_LTO=ONCMake option and CMake >= 3.9 to enable it. updateNotificationSettingsis now automatically sent when the mute time expires for a chat.- Added automatic sending of a corresponding
chatActionwhen a file is being uploaded. updateUserChatActionwithchatActionCancelis now automatically sent when the timeout expires for an action.- Authorization states
authorizationStateWaitCodeandauthorizationStateWaitPasswordare now saved between library restarts for 5 minutes. - Added new message content type
messageWebsiteConnected. - Added new text entity types
textEntityTypeCashtagandtextEntityTypePhoneNumber. - Added new update
updateUnreadMessageCount, enabled when message database is used. - Method
joinChatByInviteLinknow returns the joinedChat. - Method
getWebPagePreviewnow acceptsformattedTextinstead of plainstring. - Added field
phone_numbertoauthenticationCodeInfo, which contains a phone number that is being authenticated. - Added field
is_secrettomessageAnimation,messagePhoto,messageVideoandmessageVideoNoteclasses, which denotes whether the thumbnail for the content must be blurred and the content must be shown only while tapped. - Added field
expires_intomessageLocationfor live locations. - Added flag
can_be_reportedtochatclass. - Added flag
supports_streamingto classesvideoandinputMessageVideo. - Added parameter
message_idstoreportChat, which can be used to report specific messages. - Added method
checkChatUsernamefor checking whether a username can be set for a chat. - Added method
getRepliedMessage, which returns a message that is replied by a given message. - Added method
getChatPinnedMessage, which returns the pinned message from a chat. - Added method
searchStickersto search by emoji for popular stickers suggested by the server. - Added method
searchStickerSetsto search by title and name for popular sticker sets suggested by the server. - Added method
searchInstalledStickerSetsto search by title and name for installed sticker sets. - Added methods for handling connected websites:
getConnectedWebsites,disconnectWebsiteanddisconnectAllWebsites. - Added method
getCountryCode, which uses current user IP to identify their country. - Added option
t_me_url. - Fixed
BlackBerryspelling indeviceTokenBlackBerryPush. - Fixed return type of
getChatMessageByDatemethod, which isMessageand notMessages. - Ensured that updateOption("my_id") comes before
updateAuthorizationStatewithauthorizationStateReady. - Numerous optimizations and bug fixes.
Changes in 1.1.1:
- Fixed C JSON bindings compilation error.
- Fixed locale-dependent JSON generation.
Changes in 1.1.0:
- Methods
td::Log::set_file_pathandtd_set_log_file_pathnow return whether they succeeded. - Added methods
td::Log::set_max_file_sizeandtd_set_log_max_file_sizefor restricting maximum TDLib log size. - Added methods
td::Log::set_fatal_error_callbackandtd_set_log_fatal_error_callbackfor providing callbacks on fatal errors. - JNI-bindings are now package-agnostic. Use CMake option
TD_ENABLE_JNIto enable JNI-bindings. - Added a Java example. See README for build and usage instructions.
- Added support for text entities in media captions.
- Added new type
formattedTextcontaining a text with entities. - Replaced all string fields
captionwith fields of typeformattedText. - Replaced fields
textandentitieswith the fieldtextof typeformattedTextin classmessageText. - Replaced fields
textandentitieswith the fieldtextof typeformattedTextin classinputMessageText. - Replaced fields
textandtext_entitieswith the fieldtextof typeformattedTextin classgame. - Removed field
parse_modefrom classinputMessageText. - Added synchronous method
parseTextEntities.
- Added new type
- updateNewMessage is now sent for all sent messages.
- updateChatLastMessage is now sent when any field of the last message in a chat changes.
- Reworked the
registerDevicemethod:- Added parameter
other_user_idsto methodregisterDeviceto support multiple accounts. - It is now possible to specify tokens for VoIP pushes, WNS, web Push API, Tizen Push Service as
DeviceToken. - Added support for Apple Push Notification Service inside App Sandbox.
- Added parameter
- Added method
searchChatsOnServeranalogous tosearchChats, but using server search. - Results from the
searchChatsOnServermethod are now excluded fromsearchPublicChatsresults, sosearchChatsOnServer(along withsearchContacts) should be called wheneversearchPublicChatsis called to ensure that no results were omitted. - Added parameter
as_albumto methodgetPublicMessageLinkto enable getting public links for media albums. - Added field
htmlto classpublicMessageLink, containing HTML-code for message/message album embedding. - Added parameter
only_if_pendingto methodcancelDownloadFileto allow keeping already started downloads. - Methods
createPrivateChat,createBasciGroupChat,createSupergroupChatandcreateSecretChatcan now be called without a prior call togetUser/getBasicGroup/getSupergorup/getSecretChat. - Added parameter
forceto methodscreatePrivateChat,createBasciGroupChatandcreateSupergroupChatto allow creating a chat without network requests. - Numerous optimizations and bug fixes.