Skip to content

Commit

Permalink
Update version to 1.2.0.
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 3f8e087ddc61c7a1aa2db5f51d954eba197d11b6
  • Loading branch information
levlam committed Mar 19, 2018
1 parent 1701045 commit be48e78
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 11 deletions.
46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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}")
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion example/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion example/uwp/extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
8 changes: 4 additions & 4 deletions td/telegram/Td.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>()));
Expand Down Expand Up @@ -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));

Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion td/telegram/Td.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit be48e78

Please sign in to comment.