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

Update API scheme to layer 102.

This commit is contained in:
John Preston
2019-06-06 18:42:15 +03:00
parent 37df26fc34
commit 14b82698f8
12 changed files with 113 additions and 84 deletions

View File

@@ -618,16 +618,10 @@ void PeerMenuDeleteContact(not_null<UserData*> user) {
App::peerName(user));
const auto deleteSure = [=] {
Ui::hideLayer();
user->session().api().request(MTPcontacts_DeleteContact(
user->inputUser
)).done([=](const MTPcontacts_Link &result) {
result.match([&](const MTPDcontacts_link &data) {
user->owner().processUser(data.vuser);
App::feedUserLink(
MTP_int(peerToUser(user->id)),
data.vmy_link,
data.vforeign_link);
});
user->session().api().request(MTPcontacts_DeleteContacts(
MTP_vector<MTPInputUser>(1, user->inputUser)
)).done([=](const MTPUpdates &result) {
user->session().api().applyUpdates(result);
}).send();
};
Ui::show(Box<ConfirmBox>(