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

Update API scheme to layer 82.

This commit is contained in:
John Preston
2018-06-26 14:58:29 +01:00
parent 941288b58e
commit ff53404d5b
20 changed files with 129 additions and 50 deletions

View File

@@ -995,6 +995,8 @@ std::vector<int> SortedContactsIndices(const ContactsList &data) {
bool AppendTopPeers(ContactsList &to, const MTPcontacts_TopPeers &data) {
return data.match([](const MTPDcontacts_topPeersNotModified &data) {
return false;
}, [](const MTPDcontacts_topPeersDisabled &data) {
return true;
}, [&](const MTPDcontacts_topPeers &data) {
const auto peers = ParsePeersLists(data.vusers, data.vchats);
const auto append = [&](
@@ -1128,7 +1130,9 @@ DialogInfo::Type DialogTypeFromUser(const User &user) {
DialogsInfo ParseDialogsInfo(const MTPmessages_Dialogs &data) {
auto result = DialogsInfo();
const auto folder = QString();
data.match([&](const auto &data) { // MTPDmessages_dialogs &data) {
data.match([](const MTPDmessages_dialogsNotModified &data) {
Unexpected("dialogsNotModified in ParseDialogsInfo.");
}, [&](const auto &data) { // MTPDmessages_dialogs &data) {
const auto peers = ParsePeersLists(data.vusers, data.vchats);
const auto messages = ParseMessagesList(data.vmessages, folder);
result.list.reserve(result.list.size() + data.vdialogs.v.size());