From b672a7de226d11f8f89435e52ce2f32f27788f03 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 16 Nov 2021 12:34:17 +0300 Subject: [PATCH] Add session.can_accept_secret_chats. --- td/generate/scheme/td_api.tl | 3 ++- td/telegram/Account.cpp | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 46752f47d..79b2dc2ba 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -3101,13 +3101,14 @@ accountTtl days:int32 = AccountTtl; //@description Contains information about one session in a Telegram application used by the current user. Sessions must be shown to the user in the returned order //@id Session identifier @is_current True, if this session is the current session //@is_password_pending True, if a password is needed to complete authorization of the session +//@can_accept_secret_chats True, if incoming secret chats can be accepted by the session //@api_id Telegram API identifier, as provided by the application @application_name Name of the application, as provided by the application //@application_version The version of the application, as provided by the application @is_official_application True, if the application is an official application or uses the api_id of an official application //@device_model Model of the device the application has been run or is running on, as provided by the application @platform Operating system the application has been run or is running on, as provided by the application //@system_version Version of the operating system the application has been run or is running on, as provided by the application @log_in_date Point in time (Unix timestamp) when the user has logged in //@last_active_date Point in time (Unix timestamp) when the session was last used @ip IP address from which the session was created, in human-readable format //@country A two-letter country code for the country from which the session was created, based on the IP address @region Region code from which the session was created, based on the IP address -session id:int64 is_current:Bool is_password_pending:Bool api_id:int32 application_name:string application_version:string is_official_application:Bool device_model:string platform:string system_version:string log_in_date:int32 last_active_date:int32 ip:string country:string region:string = Session; +session id:int64 is_current:Bool is_password_pending:Bool can_accept_secret_chats:Bool api_id:int32 application_name:string application_version:string is_official_application:Bool device_model:string platform:string system_version:string log_in_date:int32 last_active_date:int32 ip:string country:string region:string = Session; //@description Contains a list of sessions @sessions List of sessions sessions sessions:vector = Sessions; diff --git a/td/telegram/Account.cpp b/td/telegram/Account.cpp index ed83b2a64..6afb127dd 100644 --- a/td/telegram/Account.cpp +++ b/td/telegram/Account.cpp @@ -32,10 +32,11 @@ static td_api::object_ptr convert_authorization_object( tl_object_ptr &&authorization) { CHECK(authorization != nullptr); return td_api::make_object( - authorization->hash_, authorization->current_, authorization->password_pending_, authorization->api_id_, - authorization->app_name_, authorization->app_version_, authorization->official_app_, authorization->device_model_, - authorization->platform_, authorization->system_version_, authorization->date_created_, - authorization->date_active_, authorization->ip_, authorization->country_, authorization->region_); + authorization->hash_, authorization->current_, authorization->password_pending_, + authorization->encrypted_requests_disabled_, authorization->api_id_, authorization->app_name_, + authorization->app_version_, authorization->official_app_, authorization->device_model_, authorization->platform_, + authorization->system_version_, authorization->date_created_, authorization->date_active_, authorization->ip_, + authorization->country_, authorization->region_); } class SetAccountTtlQuery final : public Td::ResultHandler {