diff --git a/td/telegram/InlineQueriesManager.cpp b/td/telegram/InlineQueriesManager.cpp index 734ae6f9..3494b997 100644 --- a/td/telegram/InlineQueriesManager.cpp +++ b/td/telegram/InlineQueriesManager.cpp @@ -1713,6 +1713,12 @@ bool InlineQueriesManager::load_recently_used_bots(Promise &promise) { auto bot_ids = full_split(saved_bot_ids, ','); string saved_bots = G()->td_db()->get_binlog_pmc()->get("recently_used_inline_bot_usernames"); auto bot_usernames = full_split(saved_bots, ','); + if (bot_ids.size() == 1 && bot_ids[0].empty()) { + bot_ids.clear(); + } + if (bot_usernames.size() == 1 && bot_usernames[0].empty()) { + bot_usernames.clear(); + } if (bot_ids.empty() && bot_usernames.empty()) { recently_used_bots_loaded_ = 2; if (!recently_used_bot_user_ids_.empty()) { diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 4c7d69f8..c24763a4 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -26903,8 +26903,7 @@ bool MessagesManager::load_recently_found_dialogs(Promise &promise) { } string found_dialogs_str = G()->td_db()->get_binlog_pmc()->get("recently_found_dialog_usernames_and_ids"); - auto found_dialogs = full_split(found_dialogs_str, ','); - if (found_dialogs.empty()) { + if (found_dialogs_str.empty()) { recently_found_dialogs_loaded_ = 2; if (!recently_found_dialog_ids_.empty()) { save_recently_found_dialogs(); @@ -26912,6 +26911,7 @@ bool MessagesManager::load_recently_found_dialogs(Promise &promise) { return true; } + auto found_dialogs = full_split(found_dialogs_str, ','); if (recently_found_dialogs_loaded_ == 1 && resolve_recent_found_dialogs_multipromise_.promise_count() == 0) { // queries was sent and have already been finished auto newly_found_dialogs = std::move(recently_found_dialog_ids_);