2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Simplified extracting of data from some MTP* responses.

This commit is contained in:
23rd
2022-07-10 17:59:52 +03:00
committed by John Preston
parent 44a7d11e4a
commit 89a3462824
5 changed files with 7 additions and 26 deletions

View File

@@ -379,10 +379,7 @@ void AddContactBox::save() {
MTP_string(lastName)))
)).done(crl::guard(weak, [=](
const MTPcontacts_ImportedContacts &result) {
const auto &data = result.match([](
const auto &data) -> const MTPDcontacts_importedContacts& {
return data;
});
const auto &data = result.data();
session->data().processUsers(data.vusers());
if (!weak) {
return;