diff --git a/td/telegram/ConfigManager.cpp b/td/telegram/ConfigManager.cpp index 5b3f3c88..9360b5fb 100644 --- a/td/telegram/ConfigManager.cpp +++ b/td/telegram/ConfigManager.cpp @@ -367,6 +367,10 @@ class ConfigRecoverer : public Actor { } static bool check_phone_number_rules(Slice phone_number, Slice rules) { + if (rules.empty() || phone_number.empty()) { + return true; + } + bool found = false; for (auto prefix : full_split(rules, ',')) { if (prefix.empty()) { diff --git a/test/mtproto.cpp b/test/mtproto.cpp index 620b4fa2..2663d972 100644 --- a/test/mtproto.cpp +++ b/test/mtproto.cpp @@ -43,7 +43,7 @@ TEST(Mtproto, config) { auto run = [&](auto &func, bool is_test) { auto promise = PromiseCreator::lambda([&, num = cnt](Result r_simple_config) { if (r_simple_config.is_ok()) { - LOG(ERROR) << num << " " << to_string(r_simple_config.ok()); + LOG(WARNING) << num << " " << to_string(r_simple_config.ok()); } else { LOG(ERROR) << num << " " << r_simple_config.error(); }