2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Better special config implementation.

This commit is contained in:
John Preston
2018-05-02 22:27:03 +03:00
parent 95fee543ec
commit 4bf66cb6e9
12 changed files with 200 additions and 85 deletions

View File

@@ -388,9 +388,13 @@ void ConnectionPrivate::appendTestConnection(
onDisconnected(weak);
});
const auto dcId = MTP::bareDcId(_shiftedDcId);
const auto simpleDcId = MTP::isTemporaryDcId(dcId)
? MTP::getRealIdFromTemporaryDcId(dcId)
: dcId;
const auto protocolDcId = (_dcType == DcType::MediaDownload)
? -MTP::bareDcId(_shiftedDcId)
: MTP::bareDcId(_shiftedDcId);
? -simpleDcId
: simpleDcId;
InvokeQueued(_testConnections.back().data, [=] {
weak->connectToServer(ip, port, protocolSecret, protocolDcId);
});