Add more DC migrate prefixes.

GitOrigin-RevId: 78a225cc24dc41e1f7c716d465f973d637d5ce7b
This commit is contained in:
levlam 2020-02-12 20:01:27 +03:00
parent 9964c011ec
commit 6fa11510e0

View File

@ -297,7 +297,8 @@ NetQueryDispatcher::~NetQueryDispatcher() = default;
void NetQueryDispatcher::try_fix_migrate(NetQueryPtr &net_query) {
auto msg = net_query->error().message();
static constexpr CSlice prefixes[] = {"PHONE_MIGRATE_", "NETWORK_MIGRATE_", "USER_MIGRATE_"};
static constexpr CSlice prefixes[] = {"PHONE_MIGRATE_", "NETWORK_MIGRATE_", "USER_MIGRATE_", "FILE_MIGRATE_",
"STATS_MIGRATE_"};
for (auto &prefix : prefixes) {
if (msg.substr(0, prefix.size()) == prefix) {
int32 new_main_dc_id = to_integer<int32>(msg.substr(prefix.size()));