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

Update API scheme on layer 158.

This commit is contained in:
John Preston
2023-04-03 11:58:30 +04:00
parent 6be2fb9790
commit 312aa4b130
24 changed files with 198 additions and 127 deletions

View File

@@ -216,7 +216,7 @@ void ImportInvite(
auto inputs = peers | ranges::views::transform([](auto peer) {
return MTPInputPeer(peer->input);
}) | ranges::to<QVector>();
api->request(MTPcommunities_JoinCommunityInvite(
api->request(MTPchatlists_JoinChatlistInvite(
MTP_string(slug),
MTP_vector<MTPInputPeer>(std::move(inputs))
)).done(callback).fail(error).send();
@@ -527,7 +527,7 @@ void CheckFilterInvite(
const auto session = &controller->session();
const auto weak = base::make_weak(controller);
session->api().checkFilterInvite(slug, [=](
const MTPcommunities_CommunityInvite &result) {
const MTPchatlists_ChatlistInvite &result) {
const auto strong = weak.get();
if (!strong) {
return;
@@ -550,11 +550,11 @@ void CheckFilterInvite(
}
return result;
};
result.match([&](const MTPDcommunities_communityInvite &data) {
result.match([&](const MTPDchatlists_chatlistInvite &data) {
title = qs(data.vtitle());
iconEmoji = data.vemoticon().value_or_empty();
peers = parseList(data.vpeers());
}, [&](const MTPDcommunities_communityInviteAlready &data) {
}, [&](const MTPDchatlists_chatlistInviteAlready &data) {
filterId = data.vfilter_id().v;
peers = parseList(data.vmissing_peers());
already = parseList(data.valready_peers());

View File

@@ -58,7 +58,7 @@ JoinedByLinkSlice ParseJoinedByLinkSlice(
result.users.push_back({
.user = owner.user(data.vuser_id()),
.date = data.vdate().v,
.viaFilterLink = data.is_via_community(),
.viaFilterLink = data.is_via_chatlist(),
});
});
}