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

Update API scheme to layer 104.

This commit is contained in:
John Preston
2019-07-15 15:57:49 +02:00
parent c0f8ab8da0
commit 4544a2e331
9 changed files with 86 additions and 40 deletions

View File

@@ -48,7 +48,8 @@ void RemoveAdmin(
channel->session().api().request(MTPchannels_EditAdmin(
channel->inputChannel,
user->inputUser,
newRights
newRights,
MTP_string(QString()) // #TODO ranks
)).done([=](const MTPUpdates &result) {
channel->session().api().applyUpdates(result);
channel->applyEditAdmin(user, oldRights, newRights);
@@ -124,7 +125,8 @@ void SaveChannelAdmin(
channel->session().api().request(MTPchannels_EditAdmin(
channel->inputChannel,
user->inputUser,
newRights
newRights,
MTP_string(QString()) // #TODO ranks
)).done([=](const MTPUpdates &result) {
channel->session().api().applyUpdates(result);
channel->applyEditAdmin(user, oldRights, newRights);
@@ -1460,7 +1462,8 @@ void ParticipantsBoxController::editAdminDone(
? alreadyPromotedBy->bareId()
: user->session().userId()),
MTP_int(date),
rights));
rights,
MTPstring())); // #TODO ranks
if (_role == Role::Admins) {
prependRow(user);
} else if (_role == Role::Kicked || _role == Role::Restricted) {