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

Update API scheme to layer 133.

This commit is contained in:
John Preston
2021-08-25 11:15:05 +03:00
parent ce7a3c354c
commit a6c98f4bb4
61 changed files with 618 additions and 615 deletions

View File

@@ -644,7 +644,7 @@ UserData *ParticipantsAdditionalData::applyAdmin(
return user;
}
UserData *ParticipantsAdditionalData::applyRegular(MTPint userId) {
UserData *ParticipantsAdditionalData::applyRegular(MTPlong userId) {
const auto user = _peer->owner().userLoaded(userId);
if (!user) {
return nullptr;
@@ -1309,14 +1309,14 @@ void ParticipantsBoxController::loadMoreRows() {
const auto perPage = (_offset > 0)
? kParticipantsPerPage
: kParticipantsFirstPageCount;
const auto participantsHash = 0;
const auto participantsHash = uint64(0);
_loadRequestId = _api.request(MTPchannels_GetParticipants(
channel->inputChannel,
filter,
MTP_int(_offset),
MTP_int(perPage),
MTP_int(participantsHash)
MTP_long(participantsHash)
)).done([=](const MTPchannels_ChannelParticipants &result) {
const auto firstLoad = !_offset;
_loadRequestId = 0;
@@ -1575,7 +1575,7 @@ void ParticipantsBoxController::editAdminDone(
MTP_flags(Flag::f_can_edit
| (rank.isEmpty() ? Flag(0) : Flag::f_rank)),
peerToBareMTPInt(user->id),
MTPint(), // inviter_id
MTPlong(), // inviter_id
peerToBareMTPInt(alreadyPromotedBy
? alreadyPromotedBy->id
: user->session().userPeerId()),
@@ -1971,9 +1971,9 @@ void ParticipantsBoxController::subscribeToCreatorChange(
api->request(MTPchannels_GetParticipants(
channel->inputChannel,
MTP_channelParticipantsRecent(),
MTP_int(0),
MTP_int(0), // offset
MTP_int(channel->session().serverConfig().chatSizeMax),
MTP_int(0)
MTP_long(0) // hash
)).done([=](const MTPchannels_ChannelParticipants &result) {
if (channel->amCreator()) {
channel->mgInfo->creator = channel->session().user().get();
@@ -2100,15 +2100,15 @@ bool ParticipantsBoxSearchController::loadMoreRows() {
// For search we request a lot of rows from the first query.
// (because we've waited for search request by timer already,
// so we don't expect it to be fast, but we want to fill cache).
auto perPage = kParticipantsPerPage;
auto participantsHash = 0;
const auto perPage = kParticipantsPerPage;
const auto participantsHash = uint64(0);
_requestId = _api.request(MTPchannels_GetParticipants(
_channel->inputChannel,
filter,
MTP_int(_offset),
MTP_int(perPage),
MTP_int(participantsHash)
MTP_long(participantsHash)
)).done([=](
const MTPchannels_ChannelParticipants &result,
mtpRequestId requestId) {