diff --git a/Telegram/SourceFiles/apiwrap.cpp b/Telegram/SourceFiles/apiwrap.cpp index 9fc1f84c8..b7425050c 100644 --- a/Telegram/SourceFiles/apiwrap.cpp +++ b/Telegram/SourceFiles/apiwrap.cpp @@ -584,7 +584,7 @@ void ApiWrap::requestLastParticipants(ChannelData *channel, bool fromStart) { auto requestId = request(MTPchannels_GetParticipants(channel->inputChannel, MTP_channelParticipantsRecent(), MTP_int(fromStart ? 0 : channel->mgInfo->lastParticipants.size()), - MTP_int(Global::ChatSizeMax()))) + MTP_int(Global::ChatSizeMax()), MTP_int(0))) .done([this, channel](const MTPchannels_ChannelParticipants &result, mtpRequestId requestId) { lastParticipantsDone(channel, result, requestId); }) @@ -605,7 +605,7 @@ void ApiWrap::requestBots(ChannelData *channel) { } auto requestId = request(MTPchannels_GetParticipants(channel->inputChannel, MTP_channelParticipantsBots(), - MTP_int(0), MTP_int(Global::ChatSizeMax()))) + MTP_int(0), MTP_int(Global::ChatSizeMax()), MTP_int(0))) .done([this, channel](const MTPchannels_ChannelParticipants &result, mtpRequestId requestId) { lastParticipantsDone(channel, result, requestId); }) @@ -1858,7 +1858,7 @@ void ApiWrap::jumpToDate(not_null peer, const QDate &date) { auto add_offset = -1; auto limit = 1; request(MTPmessages_GetHistory(peer->input, MTP_int(0), MTP_int(offset_date), MTP_int(add_offset), MTP_int(limit), - MTP_int(0), MTP_int(0))) + MTP_int(0), MTP_int(0), MTP_int(0))) .done([peer](const MTPmessages_Messages &result) { auto getMessagesList = [&result, peer]() -> const QVector * { auto handleMessages = [](auto &messages) { diff --git a/Telegram/SourceFiles/boxes/send_files_box.cpp b/Telegram/SourceFiles/boxes/send_files_box.cpp index 01c9ab62e..1c7d07e21 100644 --- a/Telegram/SourceFiles/boxes/send_files_box.cpp +++ b/Telegram/SourceFiles/boxes/send_files_box.cpp @@ -804,7 +804,7 @@ void EditCaptionBox::onSave(bool ctrlShiftEnter) { auto text = TextUtilities::PrepareForSending(_field->getLastText(), TextUtilities::PrepareTextOption::CheckLinks); _saveRequestId = MTP::send(MTPmessages_EditMessage(MTP_flags(flags), item->history()->peer->input, MTP_int(item->id), - MTP_string(text), MTPnullMarkup, sentEntities), + MTP_string(text), MTPnullMarkup, sentEntities, MTP_inputGeoPointEmpty()), rpcDone(&EditCaptionBox::saveDone), rpcFail(&EditCaptionBox::saveFail)); } diff --git a/Telegram/SourceFiles/history/history_admin_log_inner.cpp b/Telegram/SourceFiles/history/history_admin_log_inner.cpp index 0282a360e..5bcc444cf 100644 --- a/Telegram/SourceFiles/history/history_admin_log_inner.cpp +++ b/Telegram/SourceFiles/history/history_admin_log_inner.cpp @@ -339,8 +339,9 @@ void InnerWidget::applySearch(const QString &query) { } void InnerWidget::requestAdmins() { + auto participantsHash = 0; request(MTPchannels_GetParticipants(_channel->inputChannel, MTP_channelParticipantsAdmins(), MTP_int(0), - MTP_int(kMaxChannelAdmins))) + MTP_int(kMaxChannelAdmins), MTP_int(participantsHash))) .done([this](const MTPchannels_ChannelParticipants &result) { Expects(result.type() == mtpc_channels_channelParticipants); auto &participants = result.c_channels_channelParticipants(); diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index 94d233cae..cdab8ce36 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -2605,7 +2605,7 @@ void HistoryWidget::firstLoadMessages() { _firstLoadRequest = MTP::send(MTPmessages_GetHistory(from->input, MTP_int(offset_id), MTP_int(0), MTP_int(offset), - MTP_int(loadCount), MTP_int(0), MTP_int(0)), + MTP_int(loadCount), MTP_int(0), MTP_int(0), MTP_int(0)), rpcDone(&HistoryWidget::messagesReceived, from), rpcFail(&HistoryWidget::messagesFailed)); } @@ -2629,7 +2629,7 @@ void HistoryWidget::loadMessages() { _preloadRequest = MTP::send(MTPmessages_GetHistory(from->peer->input, MTP_int(offset_id), MTP_int(0), MTP_int(offset), - MTP_int(loadCount), MTP_int(0), MTP_int(0)), + MTP_int(loadCount), MTP_int(0), MTP_int(0), MTP_int(0)), rpcDone(&HistoryWidget::messagesReceived, from->peer), rpcFail(&HistoryWidget::messagesFailed)); } @@ -2658,7 +2658,7 @@ void HistoryWidget::loadMessagesDown() { _preloadDownRequest = MTP::send(MTPmessages_GetHistory(from->peer->input, MTP_int(offset_id + 1), MTP_int(0), MTP_int(offset), - MTP_int(loadCount), MTP_int(0), MTP_int(0)), + MTP_int(loadCount), MTP_int(0), MTP_int(0), MTP_int(0)), rpcDone(&HistoryWidget::messagesReceived, from->peer), rpcFail(&HistoryWidget::messagesFailed)); } @@ -2698,7 +2698,7 @@ void HistoryWidget::delayedShowAt(MsgId showAtMsgId) { _delayedShowAtRequest = MTP::send(MTPmessages_GetHistory(from->input, MTP_int(offset_id), MTP_int(0), MTP_int(offset), - MTP_int(loadCount), MTP_int(0), MTP_int(0)), + MTP_int(loadCount), MTP_int(0), MTP_int(0), MTP_int(0)), rpcDone(&HistoryWidget::messagesReceived, from), rpcFail(&HistoryWidget::messagesFailed)); } @@ -2864,7 +2864,7 @@ void HistoryWidget::saveEditMsg() { } _saveEditMsgRequestId = MTP::send( MTPmessages_EditMessage(MTP_flags(sendFlags), _history->peer->input, MTP_int(_editMsgId), - MTP_string(sending.text), MTPnullMarkup, sentEntities), + MTP_string(sending.text), MTPnullMarkup, sentEntities, MTP_inputGeoPointEmpty()), rpcDone(&HistoryWidget::saveEditMsgDone, _history), rpcFail(&HistoryWidget::saveEditMsgFail, _history)); } diff --git a/Telegram/SourceFiles/inline_bots/inline_bot_send_data.cpp b/Telegram/SourceFiles/inline_bots/inline_bot_send_data.cpp index 189111bcf..b0e89c94f 100644 --- a/Telegram/SourceFiles/inline_bots/inline_bot_send_data.cpp +++ b/Telegram/SourceFiles/inline_bots/inline_bot_send_data.cpp @@ -73,8 +73,9 @@ SendDataCommon::SentMTPMessageFields SendGeo::getSentMessageFields() const { SendDataCommon::SentMTPMessageFields SendVenue::getSentMessageFields() const { SentMTPMessageFields result; + QString venueType; result.media = MTP_messageMediaVenue(_location.toMTP(), MTP_string(_title), MTP_string(_address), - MTP_string(_provider), MTP_string(_venueId)); + MTP_string(_provider), MTP_string(_venueId), MTP_string(venueType)); return result; } diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index 1cf256502..1195e73a5 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -1262,9 +1262,9 @@ bool MainWidget::kickParticipantFail(ChatData *chat, const RPCError &error) { } void MainWidget::checkPeerHistory(PeerData *peer) { - MTP::send( - MTPmessages_GetHistory(peer->input, MTP_int(0), MTP_int(0), MTP_int(0), MTP_int(1), MTP_int(0), MTP_int(0)), - rpcDone(&MainWidget::checkedHistory, peer)); + MTP::send(MTPmessages_GetHistory(peer->input, MTP_int(0), MTP_int(0), MTP_int(0), MTP_int(1), MTP_int(0), + MTP_int(0), MTP_int(0)), + rpcDone(&MainWidget::checkedHistory, peer)); } void MainWidget::checkedHistory(PeerData *peer, const MTPmessages_Messages &result) { diff --git a/Telegram/SourceFiles/mainwindow.cpp b/Telegram/SourceFiles/mainwindow.cpp index 328b31cfc..cfd6b21be 100644 --- a/Telegram/SourceFiles/mainwindow.cpp +++ b/Telegram/SourceFiles/mainwindow.cpp @@ -313,9 +313,10 @@ void MainWindow::sendServiceHistoryRequest() { MTPstring(), MTP_string("42777"), MTP_userProfilePhotoEmpty(), MTP_userStatusRecently(), MTPint(), MTPstring(), MTPstring(), MTPstring()))); } - _serviceHistoryRequest = MTP::send( - MTPmessages_GetHistory(user->input, MTP_int(0), MTP_int(0), MTP_int(0), MTP_int(1), MTP_int(0), MTP_int(0)), - _main->rpcDone(&MainWidget::serviceHistoryDone), _main->rpcFail(&MainWidget::serviceHistoryFail)); + _serviceHistoryRequest = + MTP::send(MTPmessages_GetHistory(user->input, MTP_int(0), MTP_int(0), MTP_int(0), MTP_int(1), MTP_int(0), + MTP_int(0), MTP_int(0)), + _main->rpcDone(&MainWidget::serviceHistoryDone), _main->rpcFail(&MainWidget::serviceHistoryFail)); } void MainWindow::setupMain(const MTPUser *self) { diff --git a/Telegram/SourceFiles/profile/profile_channel_controllers.cpp b/Telegram/SourceFiles/profile/profile_channel_controllers.cpp index b746cef95..f8b24f664 100644 --- a/Telegram/SourceFiles/profile/profile_channel_controllers.cpp +++ b/Telegram/SourceFiles/profile/profile_channel_controllers.cpp @@ -241,7 +241,8 @@ void ParticipantsBoxController::loadMoreRows() { // First query is small and fast, next loads a lot of rows. auto perPage = (_offset > 0) ? kParticipantsPerPage : kParticipantsFirstPageCount; _loadRequestId = - request(MTPchannels_GetParticipants(_channel->inputChannel, filter(), MTP_int(_offset), MTP_int(perPage))) + request(MTPchannels_GetParticipants(_channel->inputChannel, filter(), MTP_int(_offset), MTP_int(perPage), + MTP_int(0))) .done([this](const MTPchannels_ChannelParticipants &result) { Expects(result.type() == mtpc_channels_channelParticipants); @@ -649,19 +650,19 @@ bool ParticipantsBoxSearchController::loadMoreRows() { // (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; - _requestId = - request(MTPchannels_GetParticipants(_channel->inputChannel, filter(), MTP_int(_offset), MTP_int(perPage))) - .done([this, perPage](const MTPchannels_ChannelParticipants &result, mtpRequestId requestId) { - searchDone(requestId, result, perPage); - }) - .fail([this](const RPCError &error, mtpRequestId requestId) { - if (_requestId == requestId) { - _requestId = 0; - _allLoaded = true; - delegate()->peerListSearchRefreshRows(); - } - }) - .send(); + _requestId = request(MTPchannels_GetParticipants(_channel->inputChannel, filter(), MTP_int(_offset), + MTP_int(perPage), MTP_int(0))) + .done([this, perPage](const MTPchannels_ChannelParticipants &result, mtpRequestId requestId) { + searchDone(requestId, result, perPage); + }) + .fail([this](const RPCError &error, mtpRequestId requestId) { + if (_requestId == requestId) { + _requestId = 0; + _allLoaded = true; + delegate()->peerListSearchRefreshRows(); + } + }) + .send(); auto entry = Query(); entry.text = _query; @@ -763,7 +764,7 @@ void AddParticipantBoxController::loadMoreRows() { // First query is small and fast, next loads a lot of rows. auto perPage = (_offset > 0) ? kParticipantsPerPage : kParticipantsFirstPageCount; _loadRequestId = request(MTPchannels_GetParticipants(_channel->inputChannel, MTP_channelParticipantsRecent(), - MTP_int(_offset), MTP_int(perPage))) + MTP_int(_offset), MTP_int(perPage), MTP_int(0))) .done([this](const MTPchannels_ChannelParticipants &result) { Expects(result.type() == mtpc_channels_channelParticipants); @@ -1278,7 +1279,7 @@ void AddParticipantBoxSearchController::requestParticipants() { auto perPage = kParticipantsPerPage; _requestId = request(MTPchannels_GetParticipants(_channel->inputChannel, MTP_channelParticipantsSearch(MTP_string(_query)), - MTP_int(_offset), MTP_int(perPage))) + MTP_int(_offset), MTP_int(perPage), MTP_int(0))) .done([this, perPage](const MTPchannels_ChannelParticipants &result, mtpRequestId requestId) { searchParticipantsDone(requestId, result, perPage); })