Add session.is_unconfirmed.

This commit is contained in:
levlam 2023-09-08 15:49:25 +03:00
parent bf500652dc
commit 66793cf2f5
2 changed files with 3 additions and 2 deletions

View File

@ -4861,6 +4861,7 @@ sessionTypeXbox = SessionType;
//@id Session identifier
//@is_current True, if this session is the current session
//@is_password_pending True, if a 2-step verification password is needed to complete authorization of the session
//@is_unconfirmed True, if the session wasn't confirmed from another session
//@can_accept_secret_chats True, if incoming secret chats can be accepted by the session
//@can_accept_calls True, if incoming calls can be accepted by the session
//@type Session type based on the system and application version, which can be used to display a corresponding icon
@ -4876,7 +4877,7 @@ sessionTypeXbox = SessionType;
//@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 can_accept_secret_chats:Bool can_accept_calls:Bool type:SessionType 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 is_unconfirmed:Bool can_accept_secret_chats:Bool can_accept_calls:Bool type:SessionType 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 @inactive_session_ttl_days Number of days of inactivity before sessions will automatically be terminated; 1-366 days
sessions sessions:vector<session> inactive_session_ttl_days:int32 = Sessions;

View File

@ -101,7 +101,7 @@ static td_api::object_ptr<td_api::session> convert_authorization_object(
tl_object_ptr<telegram_api::authorization> &&authorization) {
CHECK(authorization != nullptr);
return td_api::make_object<td_api::session>(
authorization->hash_, authorization->current_, authorization->password_pending_,
authorization->hash_, authorization->current_, authorization->password_pending_, authorization->unconfirmed_,
!authorization->encrypted_requests_disabled_, !authorization->call_requests_disabled_,
get_session_type_object(authorization), authorization->api_id_, authorization->app_name_,
authorization->app_version_, authorization->official_app_, authorization->device_model_, authorization->platform_,