Minor improvements.
This commit is contained in:
parent
1eb83f09d3
commit
1ce9f9d27c
@ -89,10 +89,12 @@ emailAddressAuthenticationGoogleId token:string = EmailAddressAuthentication;
|
||||
|
||||
//@class EmailAddressResetState @description Describes reset state of a email address
|
||||
|
||||
//@description Email address can be reset after the given period. Call resetAuthenticationEmailAddress to reset it and allow the user to authorize with a code sent to the user's phone number @wait_period Time required to wait before the email address can be reset; 0 if the user is subscribed to Telegram Premium
|
||||
//@description Email address can be reset after the given period. Call resetAuthenticationEmailAddress to reset it and allow the user to authorize with a code sent to the user's phone number
|
||||
//@wait_period Time required to wait before the email address can be reset; 0 if the user is subscribed to Telegram Premium
|
||||
emailAddressResetStateAvailable wait_period:int32 = EmailAddressResetState;
|
||||
|
||||
//@description Email address reset has already been requested. Call resetAuthenticationEmailAddress to try to reset it immediately @reset_in Left time before the email address will be reset, in seconds. updateAuthorizationState is not sent when this field changes
|
||||
//@description Email address reset has already been requested. Call resetAuthenticationEmailAddress to check whether immediate reset is possible
|
||||
//@reset_in Left time before the email address will be reset, in seconds. updateAuthorizationState is not sent when this field changes
|
||||
emailAddressResetStatePending reset_in:int32 = EmailAddressResetState;
|
||||
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "td/utils/logging.h"
|
||||
#include "td/utils/misc.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
|
||||
namespace td {
|
||||
|
@ -7,6 +7,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "td/telegram/DialogFilterId.h"
|
||||
#include "td/telegram/DialogId.h"
|
||||
#include "td/telegram/FolderId.h"
|
||||
#include "td/telegram/InputDialogId.h"
|
||||
#include "td/telegram/td_api.h"
|
||||
|
@ -86,7 +86,6 @@
|
||||
#include "td/utils/utf8.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include "td/telegram/files/FileSourceId.h"
|
||||
#include "td/telegram/FolderId.h"
|
||||
#include "td/telegram/FullMessageId.h"
|
||||
#include "td/telegram/Global.h"
|
||||
#include "td/telegram/InputDialogId.h"
|
||||
#include "td/telegram/InputGroupCallId.h"
|
||||
#include "td/telegram/logevent/LogEventHelper.h"
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "td/telegram/DialogId.h"
|
||||
#include "td/telegram/Global.h"
|
||||
#include "td/telegram/logevent/LogEvent.h"
|
||||
#include "td/telegram/MessageId.h"
|
||||
#include "td/telegram/MessagesManager.h"
|
||||
#include "td/telegram/misc.h"
|
||||
#include "td/telegram/PollId.hpp"
|
||||
@ -707,7 +708,10 @@ void PollManager::unregister_poll(PollId poll_id, FullMessageId full_message_id,
|
||||
}
|
||||
|
||||
bool PollManager::can_unload_poll(PollId poll_id) {
|
||||
if (G()->close_flag() || is_local_poll_id(poll_id) || server_poll_messages_.count(poll_id) != 0 ||
|
||||
if (G()->close_flag()) {
|
||||
return false;
|
||||
}
|
||||
if (is_local_poll_id(poll_id) || server_poll_messages_.count(poll_id) != 0 ||
|
||||
other_poll_messages_.count(poll_id) != 0 || pending_answers_.count(poll_id) != 0 ||
|
||||
being_closed_polls_.count(poll_id) != 0) {
|
||||
return false;
|
||||
|
@ -99,7 +99,6 @@
|
||||
#include "td/telegram/PasswordManager.h"
|
||||
#include "td/telegram/Payments.h"
|
||||
#include "td/telegram/PhoneNumberManager.h"
|
||||
#include "td/telegram/Photo.h"
|
||||
#include "td/telegram/PhotoSizeSource.h"
|
||||
#include "td/telegram/PollManager.h"
|
||||
#include "td/telegram/Premium.h"
|
||||
|
@ -74,7 +74,7 @@ Result<FileLoader::FileInfo> FileDownloader::init() {
|
||||
auto result_fd = FileFd::open(path_, FileFd::Write | FileFd::Read);
|
||||
// TODO: check timestamps..
|
||||
if (result_fd.is_ok()) {
|
||||
if ((!encryption_key_.is_secret() || partial.iv_.size() == 32) && 0 <= partial.part_size_ &&
|
||||
if ((!encryption_key_.is_secret() || partial.iv_.size() == 32) && partial.part_size_ >= 0 &&
|
||||
partial.part_size_ <= (1 << 20) && (partial.part_size_ & (partial.part_size_ - 1)) == 0) {
|
||||
bitmask = Bitmask(Bitmask::Decode{}, partial.ready_bitmask_);
|
||||
if (encryption_key_.is_secret()) {
|
||||
|
Loading…
Reference in New Issue
Block a user