Remove handling of legacy promoted_dialog_id.

GitOrigin-RevId: bceea028730472fe367a9a904301896903afe571
This commit is contained in:
levlam 2020-04-28 01:02:29 +03:00
parent da6f582788
commit 2c728d17b5
2 changed files with 0 additions and 9 deletions

View File

@ -10343,13 +10343,6 @@ void MessagesManager::init() {
}
auto sponsored_dialog_id_string = G()->td_db()->get_binlog_pmc()->get("sponsored_dialog_id");
if (sponsored_dialog_id_string.empty()) {
sponsored_dialog_id_string = G()->td_db()->get_binlog_pmc()->get("promoted_dialog_id");
if (!sponsored_dialog_id_string.empty()) {
G()->td_db()->get_binlog_pmc()->erase("promoted_dialog_id");
G()->td_db()->get_binlog_pmc()->set("sponsored_dialog_id", sponsored_dialog_id_string);
}
}
if (!sponsored_dialog_id_string.empty()) {
auto r_dialog_id = to_integer_safe<int64>(sponsored_dialog_id_string);
if (r_dialog_id.is_error()) {
@ -10430,7 +10423,6 @@ void MessagesManager::init() {
G()->td_db()->get_binlog_pmc()->erase_by_prefix("last_server_dialog_date");
G()->td_db()->get_binlog_pmc()->erase_by_prefix("unread_message_count");
G()->td_db()->get_binlog_pmc()->erase_by_prefix("unread_dialog_count");
G()->td_db()->get_binlog_pmc()->erase("promoted_dialog_id");
G()->td_db()->get_binlog_pmc()->erase("sponsored_dialog_id");
}

View File

@ -347,7 +347,6 @@ Status TdDb::init_sqlite(int32 scheduler_id, const TdParameters &parameters, DbK
binlog_pmc.erase_by_prefix("last_server_dialog_date");
binlog_pmc.erase_by_prefix("unread_message_count");
binlog_pmc.erase_by_prefix("unread_dialog_count");
binlog_pmc.erase("promoted_dialog_id");
binlog_pmc.erase("sponsored_dialog_id");
binlog_pmc.erase_by_prefix("top_dialogs");
}