Minor improvements.

This commit is contained in:
levlam 2021-06-23 03:22:23 +03:00
parent ebbc929efb
commit 9628668def
14 changed files with 15 additions and 9 deletions

View File

@ -8,13 +8,17 @@
#include "td/telegram/BotCommandScope.h"
#include "td/telegram/ContactsManager.h"
#include "td/telegram/Global.h"
#include "td/telegram/misc.h"
#include "td/telegram/Td.h"
#include "td/utils/algorithm.h"
#include "td/utils/buffer.h"
#include "td/utils/logging.h"
#include "td/utils/misc.h"
#include "td/utils/SliceBuilder.h"
#include "td/utils/Status.h"
#include "td/utils/utf8.h"
namespace td {

View File

@ -6,6 +6,7 @@
//
#include "td/telegram/BotCommandScope.h"
#include "td/telegram/AccessRights.h"
#include "td/telegram/AuthManager.h"
#include "td/telegram/ContactsManager.h"
#include "td/telegram/MessagesManager.h"

View File

@ -37,6 +37,8 @@
#include "td/net/Wget.h"
#endif
#include "td/net/HttpQuery.h"
#include "td/actor/actor.h"
#include "td/utils/algorithm.h"
@ -45,7 +47,6 @@
#include "td/utils/common.h"
#include "td/utils/crypto.h"
#include "td/utils/format.h"
#include "td/utils/HttpUrl.h"
#include "td/utils/JsonBuilder.h"
#include "td/utils/logging.h"
#include "td/utils/misc.h"

View File

@ -3380,7 +3380,9 @@ ContactsManager::ContactsManager(Td *td, ActorShared<> parent) : td_(td), parent
G()->td_db()->get_binlog_pmc()->erase("next_contacts_sync_date");
G()->td_db()->get_binlog_pmc()->erase("saved_contact_count");
}
G()->td_db()->get_sqlite_pmc()->erase_by_prefix("us_bot_info", Auto());
if (G()->parameters().use_file_db) {
G()->td_db()->get_sqlite_pmc()->erase_by_prefix("us_bot_info", Auto());
}
was_online_local_ = to_integer<int32>(G()->td_db()->get_binlog_pmc()->get("my_was_online_local"));
was_online_remote_ = to_integer<int32>(G()->td_db()->get_binlog_pmc()->get("my_was_online_remote"));

View File

@ -14,6 +14,7 @@
#include "td/telegram/DialogId.h"
#include "td/telegram/Global.h"
#include "td/telegram/MessageEntity.h"
#include "td/telegram/MessageId.h"
#include "td/telegram/MessagesManager.h"
#include "td/telegram/ServerMessageId.h"
#include "td/telegram/Td.h"

View File

@ -84,7 +84,6 @@
#include "td/utils/tl_helpers.h"
#include "td/utils/utf8.h"
#include <limits>
#include <utility>
namespace td {

View File

@ -6,6 +6,7 @@
//
#include "td/telegram/PasswordManager.h"
#include "td/telegram/ConfigManager.h"
#include "td/telegram/DhCache.h"
#include "td/telegram/Global.h"
#include "td/telegram/logevent/LogEvent.h"

View File

@ -6,10 +6,8 @@
//
#pragma once
#include "td/telegram/ConfigManager.h"
#include "td/telegram/net/NetQuery.h"
#include "td/telegram/SecureStorage.h"
#include "td/telegram/SuggestedAction.h"
#include "td/telegram/td_api.h"
#include "td/telegram/telegram_api.h"

View File

@ -24,7 +24,6 @@
#include "td/utils/tl_parsers.h"
#include "td/utils/tl_storers.h"
#include <map>
#include <memory>
#include <unordered_map>
#include <utility>

View File

@ -11,7 +11,6 @@
#include "td/utils/buffer.h"
#include "td/utils/format.h"
#include "td/utils/logging.h"
#include "td/utils/misc.h"
#include "td/utils/port/Clocks.h"
#include "td/utils/port/FileFd.h"

View File

@ -17,6 +17,7 @@
#include "td/utils/ByteFlow.h"
#include "td/utils/common.h"
#include "td/utils/crypto.h"
#include "td/utils/logging.h"
#include "td/utils/port/FileFd.h"
#include "td/utils/Slice.h"
#include "td/utils/Status.h"

View File

@ -7,6 +7,7 @@
#include "td/db/binlog/BinlogEvent.h"
#include "td/utils/crypto.h"
#include "td/utils/logging.h"
#include "td/utils/misc.h"
#include "td/utils/tl_parsers.h"
#include "td/utils/tl_storers.h"

View File

@ -9,7 +9,6 @@
#include "td/utils/buffer.h"
#include "td/utils/common.h"
#include "td/utils/format.h"
#include "td/utils/logging.h"
#include "td/utils/Slice.h"
#include "td/utils/SliceBuilder.h"
#include "td/utils/Status.h"

View File

@ -248,7 +248,7 @@ TEST(MessageEntities, tg_url) {
check_tg_url("tg://test?asdf", {"tg://test?asdf"});
check_tg_url("tg://test#asdf", {"tg://test#asdf"});
check_tg_url("tg://test?as‖df", {"tg://test?as"});
check_tg_url("tg://test?as<df", {"tg://test?as"});
check_tg_url("tg://test?sa<df", {"tg://test?sa"});
check_tg_url("tg://test?as>df", {"tg://test?as"});
check_tg_url("tg://test?as\"df", {"tg://test?as"});
check_tg_url("tg://test?as«df", {"tg://test?as"});