2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Update API scheme on layer 206.

This commit is contained in:
John Preston
2025-06-16 15:02:30 +04:00
parent 0473374d51
commit 8dbc175c02
14 changed files with 132 additions and 61 deletions

View File

@@ -655,10 +655,7 @@ void ChatParticipants::Restrict(
channel->session().api().request(MTPchannels_EditBanned(
channel->inputChannel,
participant->input,
MTP_chatBannedRights(
MTP_flags(MTPDchatBannedRights::Flags::from_raw(
uint32(newRights.flags))),
MTP_int(newRights.until))
RestrictionsToMTP(newRights)
)).done([=](const MTPUpdates &result) {
channel->session().api().applyUpdates(result);
channel->applyEditBanned(participant, oldRights, newRights);
@@ -763,10 +760,7 @@ void ChatParticipants::kick(
const auto requestId = _api.request(MTPchannels_EditBanned(
channel->inputChannel,
participant->input,
MTP_chatBannedRights(
MTP_flags(
MTPDchatBannedRights::Flags::from_raw(uint32(rights.flags))),
MTP_int(rights.until))
RestrictionsToMTP(rights)
)).done([=](const MTPUpdates &result) {
channel->session().api().applyUpdates(result);