Update version to 1.2.0.

GitOrigin-RevId: 3f8e087ddc61c7a1aa2db5f51d954eba197d11b6
This commit is contained in:
levlam 2018-03-19 16:49:39 +03:00
parent 1701045b17
commit be48e787bc
7 changed files with 57 additions and 11 deletions

View File

@ -1,3 +1,49 @@
Changes in 1.2.0:
* Added support for native .NET bindings through `C++/CLI` and `C++/CX`.
See [using in .NET projects](README.md#using-dotnet) for more details.
* Added a C# example. See [README](example/csharp/README.md) for build and usage instructions.
* Added a build and usage example of TDLib SDK for Universal Windows Platform. See
[README](example/uwp/README.md) for detailed build and usage instructions.
* Added a Swift example. See [README](example/swift/README.md) for build and usage instructions.
* Added an example of building TDLib for iOS, watchOS, tvOS, and also macOS. See [README](example/ios/README.md) for
detailed build instructions.
* Added README to [C++](example/cpp/README.md) and [python](example/python/README.md) examples.
* Link Time Optimization is disabled by default. Use `-DTD_ENABLE_LTO=ON` CMake option and CMake >= 3.9 to enable it.
* `updateNotificationSettings` is now automatically sent when the mute time expires for a chat.
* Added automatic sending of a corresponding `chatAction` when a file is being uploaded.
* `updateUserChatAction` with `chatActionCancel` is now automatically sent when the timeout expires for an action.
* Authorizatiion states `authorizationStateWaitCode` and `authorizationStateWaitPassword` are now saved between
library restarts for 5 minutes.
* Added new message content type `messageWebsiteConnected`.
* Added new text entity types `textEntityTypeCashtag` and `textEntityTypePhoneNumber`.
* Added new update `updateUnreadMessageCount`, enabled when message database is used.
* Method `joinChatByInviteLink` now returns the joined `Chat`.
* Method `getWebPagePreview` now accepts `formattedText` instead of plain `string`.
* Added field `phone_number` to `authenticationCodeInfo`, which contains a phone number that is being authenticated.
* Added field `is_secret` to `messageAnimation`, `messagePhoto`, `messageVideo` and `messageVideoNote` classes,
which denotes whether the thumbnail for the content must be blurred and the content must be shown only while tapped.
* Added field `expires_in` to `messageLocation` for live locations.
* Added flag `can_be_reported` to `chat` class.
* Added flag `supports_streaming` to classes `video` and `inputMessageVideo`.
* Added parameter `message_ids` to `reportChat`, which can be used to report specific messages.
* Added method `checkChatUsername` for 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 `searchStickers` to search by emoji for popular stickers suggested by the server.
* Added method `searchStickerSets` to search by title and name for popular sticker sets suggested by the server.
* Added method `searchInstalledStickerSets` to search by title and name for installed sticker sets.
* Added methods for handling connected websites: `getConnectedWebsites`, `disconnectWebsite` and
`disconnectAllWebsites`.
* Added method `getCountryCode`, which uses current user IP to identify their country.
* Added option `t_me_url`.
* Fixed `BlackBerry` spelling in `deviceTokenBlackBerryPush`.
* Fixed return type of `getChatMessageByDate` method, which is `Message` and not `Messages`.
* Ensured that updateOption("my_id") comes before `updateAuthorizationState` with `authorizationStateReady`.
* Numerous optimizations and bug fixes.
-----------------------------------------------------------------------------------------------------------------------
Changes in 1.1.1:
* Fixed C JSON bindings compilation error.
* Fixed locale-dependent JSON generation.

View File

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
project(TDLib VERSION 1.1.6 LANGUAGES CXX C)
project(TDLib VERSION 1.2.0 LANGUAGES CXX C)
# Prevent in-source build
get_filename_component(TD_REAL_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" REALPATH)
@ -45,11 +45,11 @@ if (POLICY CMP0069)
if (IPO_SUPPORTED)
# set_property(DIRECTORY PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE) do not work?
string(REPLACE ";" " " CXX_FLAGS_IPO "${CMAKE_CXX_COMPILE_OPTIONS_IPO}")
message(STATUS "Use link time CXX optimization options: ${CXX_FLAGS_IPO}")
message(STATUS "Use link time optimization CXX options: ${CXX_FLAGS_IPO}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CXX_FLAGS_IPO}")
string(REPLACE ";" " " C_FLAGS_IPO "${CMAKE_C_COMPILE_OPTIONS_IPO}")
message(STATUS "Use link time C optimization options: ${C_FLAGS_IPO}")
message(STATUS "Use link time optimization C options: ${C_FLAGS_IPO}")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${C_FLAGS_IPO}")
string(REPLACE ";" " " LINK_FLAGS_IPO "${CMAKE_CXX_LINK_OPTIONS_IPO}")

View File

@ -114,7 +114,7 @@ target_link_libraries(YourTarget PRIVATE Td::TdStatic)
Or you could install `TDLib` and then reference it in your CMakeLists.txt like this:
```
find_package(Td 1.1.6 REQUIRED)
find_package(Td 1.2.0 REQUIRED)
target_link_libraries(YourTarget PRIVATE Td::TdStatic)
```
See [example/cpp/CMakeLists.txt](https://github.com/tdlib/td/tree/master/example/cpp/CMakeLists.txt).

View File

@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
project(TdExample VERSION 1.0 LANGUAGES CXX)
find_package(Td 1.1.6 REQUIRED)
find_package(Td 1.2.0 REQUIRED)
add_executable(tdjson_example tdjson_example.cpp)
target_link_libraries(tdjson_example PRIVATE Td::TdJson)

View File

@ -1,6 +1,6 @@
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011">
<Metadata>
<Identity Id="Telegram.Td.UWP" Version="1.1.6" Language="en-US" Publisher="Telegram LLC" />
<Identity Id="Telegram.Td.UWP" Version="1.2.0" Language="en-US" Publisher="Telegram LLC" />
<DisplayName>TDLib for Universal Windows Platform</DisplayName>
<Description>TDLib is a library for building Telegram clients</Description>
<MoreInfo>https://core.telegram.org/tdlib</MoreInfo>

View File

@ -4466,7 +4466,7 @@ Status Td::init(DbKey key) {
};
send_closure(
actor_id(this), &Td::send_update,
make_tl_object<td_api::updateOption>("version", make_tl_object<td_api::optionValueString>(tdlib_version)));
make_tl_object<td_api::updateOption>("version", make_tl_object<td_api::optionValueString>(TDLIB_VERSION)));
G()->set_shared_config(
std::make_unique<ConfigShared>(G()->td_db()->get_config_pmc(), std::make_unique<ConfigSharedCallback>()));
@ -4829,7 +4829,7 @@ Status Td::set_parameters(td_api::object_ptr<td_api::tdlibParameters> parameters
}
if (options.api_id != 21724) {
options.application_version += ", TDLib ";
options.application_version += tdlib_version;
options.application_version += TDLIB_VERSION;
}
G()->set_mtproto_header(std::make_unique<MtprotoHeader>(options));
@ -6544,7 +6544,7 @@ void Td::on_request(uint64 id, td_api::getOption &request) {
break;
case 'v':
if (request.name_ == "version") {
option_value = make_tl_object<td_api::optionValueString>(tdlib_version);
option_value = make_tl_object<td_api::optionValueString>(TDLIB_VERSION);
}
break;
}
@ -7031,6 +7031,6 @@ void Td::on_request(uint64 id, td_api::testCallVectorStringObject &request) {
#undef CREATE_REQUEST
#undef CREATE_REQUEST_PROMISE
constexpr const char *Td::tdlib_version;
constexpr const char *Td::TDLIB_VERSION;
} // namespace td

View File

@ -193,7 +193,7 @@ class Td final : public NetQueryCallback {
static td_api::object_ptr<td_api::Object> static_request(td_api::object_ptr<td_api::Function> function);
private:
static constexpr const char *tdlib_version = "1.1.6";
static constexpr const char *TDLIB_VERSION = "1.2.0";
static constexpr int64 ONLINE_ALARM_ID = 0;
static constexpr int32 ONLINE_TIMEOUT = 240;
static constexpr int64 PING_SERVER_ALARM_ID = -1;