Minor improvements.
This commit is contained in:
parent
ebbc929efb
commit
9628668def
@ -8,13 +8,17 @@
|
|||||||
|
|
||||||
#include "td/telegram/BotCommandScope.h"
|
#include "td/telegram/BotCommandScope.h"
|
||||||
#include "td/telegram/ContactsManager.h"
|
#include "td/telegram/ContactsManager.h"
|
||||||
|
#include "td/telegram/Global.h"
|
||||||
#include "td/telegram/misc.h"
|
#include "td/telegram/misc.h"
|
||||||
#include "td/telegram/Td.h"
|
#include "td/telegram/Td.h"
|
||||||
|
|
||||||
#include "td/utils/algorithm.h"
|
#include "td/utils/algorithm.h"
|
||||||
#include "td/utils/buffer.h"
|
#include "td/utils/buffer.h"
|
||||||
#include "td/utils/logging.h"
|
#include "td/utils/logging.h"
|
||||||
|
#include "td/utils/misc.h"
|
||||||
|
#include "td/utils/SliceBuilder.h"
|
||||||
#include "td/utils/Status.h"
|
#include "td/utils/Status.h"
|
||||||
|
#include "td/utils/utf8.h"
|
||||||
|
|
||||||
namespace td {
|
namespace td {
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
//
|
//
|
||||||
#include "td/telegram/BotCommandScope.h"
|
#include "td/telegram/BotCommandScope.h"
|
||||||
|
|
||||||
|
#include "td/telegram/AccessRights.h"
|
||||||
#include "td/telegram/AuthManager.h"
|
#include "td/telegram/AuthManager.h"
|
||||||
#include "td/telegram/ContactsManager.h"
|
#include "td/telegram/ContactsManager.h"
|
||||||
#include "td/telegram/MessagesManager.h"
|
#include "td/telegram/MessagesManager.h"
|
||||||
|
@ -37,6 +37,8 @@
|
|||||||
#include "td/net/Wget.h"
|
#include "td/net/Wget.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "td/net/HttpQuery.h"
|
||||||
|
|
||||||
#include "td/actor/actor.h"
|
#include "td/actor/actor.h"
|
||||||
|
|
||||||
#include "td/utils/algorithm.h"
|
#include "td/utils/algorithm.h"
|
||||||
@ -45,7 +47,6 @@
|
|||||||
#include "td/utils/common.h"
|
#include "td/utils/common.h"
|
||||||
#include "td/utils/crypto.h"
|
#include "td/utils/crypto.h"
|
||||||
#include "td/utils/format.h"
|
#include "td/utils/format.h"
|
||||||
#include "td/utils/HttpUrl.h"
|
|
||||||
#include "td/utils/JsonBuilder.h"
|
#include "td/utils/JsonBuilder.h"
|
||||||
#include "td/utils/logging.h"
|
#include "td/utils/logging.h"
|
||||||
#include "td/utils/misc.h"
|
#include "td/utils/misc.h"
|
||||||
|
@ -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("next_contacts_sync_date");
|
||||||
G()->td_db()->get_binlog_pmc()->erase("saved_contact_count");
|
G()->td_db()->get_binlog_pmc()->erase("saved_contact_count");
|
||||||
}
|
}
|
||||||
|
if (G()->parameters().use_file_db) {
|
||||||
G()->td_db()->get_sqlite_pmc()->erase_by_prefix("us_bot_info", Auto());
|
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_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"));
|
was_online_remote_ = to_integer<int32>(G()->td_db()->get_binlog_pmc()->get("my_was_online_remote"));
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#include "td/telegram/DialogId.h"
|
#include "td/telegram/DialogId.h"
|
||||||
#include "td/telegram/Global.h"
|
#include "td/telegram/Global.h"
|
||||||
#include "td/telegram/MessageEntity.h"
|
#include "td/telegram/MessageEntity.h"
|
||||||
|
#include "td/telegram/MessageId.h"
|
||||||
#include "td/telegram/MessagesManager.h"
|
#include "td/telegram/MessagesManager.h"
|
||||||
#include "td/telegram/ServerMessageId.h"
|
#include "td/telegram/ServerMessageId.h"
|
||||||
#include "td/telegram/Td.h"
|
#include "td/telegram/Td.h"
|
||||||
|
@ -84,7 +84,6 @@
|
|||||||
#include "td/utils/tl_helpers.h"
|
#include "td/utils/tl_helpers.h"
|
||||||
#include "td/utils/utf8.h"
|
#include "td/utils/utf8.h"
|
||||||
|
|
||||||
#include <limits>
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
namespace td {
|
namespace td {
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
//
|
//
|
||||||
#include "td/telegram/PasswordManager.h"
|
#include "td/telegram/PasswordManager.h"
|
||||||
|
|
||||||
|
#include "td/telegram/ConfigManager.h"
|
||||||
#include "td/telegram/DhCache.h"
|
#include "td/telegram/DhCache.h"
|
||||||
#include "td/telegram/Global.h"
|
#include "td/telegram/Global.h"
|
||||||
#include "td/telegram/logevent/LogEvent.h"
|
#include "td/telegram/logevent/LogEvent.h"
|
||||||
|
@ -6,10 +6,8 @@
|
|||||||
//
|
//
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "td/telegram/ConfigManager.h"
|
|
||||||
#include "td/telegram/net/NetQuery.h"
|
#include "td/telegram/net/NetQuery.h"
|
||||||
#include "td/telegram/SecureStorage.h"
|
#include "td/telegram/SecureStorage.h"
|
||||||
#include "td/telegram/SuggestedAction.h"
|
|
||||||
#include "td/telegram/td_api.h"
|
#include "td/telegram/td_api.h"
|
||||||
#include "td/telegram/telegram_api.h"
|
#include "td/telegram/telegram_api.h"
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
#include "td/utils/tl_parsers.h"
|
#include "td/utils/tl_parsers.h"
|
||||||
#include "td/utils/tl_storers.h"
|
#include "td/utils/tl_storers.h"
|
||||||
|
|
||||||
#include <map>
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
#include "td/utils/buffer.h"
|
#include "td/utils/buffer.h"
|
||||||
#include "td/utils/format.h"
|
#include "td/utils/format.h"
|
||||||
#include "td/utils/logging.h"
|
|
||||||
#include "td/utils/misc.h"
|
#include "td/utils/misc.h"
|
||||||
#include "td/utils/port/Clocks.h"
|
#include "td/utils/port/Clocks.h"
|
||||||
#include "td/utils/port/FileFd.h"
|
#include "td/utils/port/FileFd.h"
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include "td/utils/ByteFlow.h"
|
#include "td/utils/ByteFlow.h"
|
||||||
#include "td/utils/common.h"
|
#include "td/utils/common.h"
|
||||||
#include "td/utils/crypto.h"
|
#include "td/utils/crypto.h"
|
||||||
|
#include "td/utils/logging.h"
|
||||||
#include "td/utils/port/FileFd.h"
|
#include "td/utils/port/FileFd.h"
|
||||||
#include "td/utils/Slice.h"
|
#include "td/utils/Slice.h"
|
||||||
#include "td/utils/Status.h"
|
#include "td/utils/Status.h"
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include "td/db/binlog/BinlogEvent.h"
|
#include "td/db/binlog/BinlogEvent.h"
|
||||||
|
|
||||||
#include "td/utils/crypto.h"
|
#include "td/utils/crypto.h"
|
||||||
|
#include "td/utils/logging.h"
|
||||||
#include "td/utils/misc.h"
|
#include "td/utils/misc.h"
|
||||||
#include "td/utils/tl_parsers.h"
|
#include "td/utils/tl_parsers.h"
|
||||||
#include "td/utils/tl_storers.h"
|
#include "td/utils/tl_storers.h"
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
#include "td/utils/buffer.h"
|
#include "td/utils/buffer.h"
|
||||||
#include "td/utils/common.h"
|
#include "td/utils/common.h"
|
||||||
#include "td/utils/format.h"
|
#include "td/utils/format.h"
|
||||||
#include "td/utils/logging.h"
|
|
||||||
#include "td/utils/Slice.h"
|
#include "td/utils/Slice.h"
|
||||||
#include "td/utils/SliceBuilder.h"
|
#include "td/utils/SliceBuilder.h"
|
||||||
#include "td/utils/Status.h"
|
#include "td/utils/Status.h"
|
||||||
|
@ -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#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?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"});
|
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"});
|
||||||
|
Loading…
Reference in New Issue
Block a user