2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 23:15:59 +00:00

Bundle silent and scheduled to Api::SendOptions.

This commit is contained in:
John Preston
2019-08-12 13:11:34 +01:00
parent 0b08810d5a
commit caef7dde24
27 changed files with 413 additions and 349 deletions

View File

@@ -680,7 +680,8 @@ void MainWidget::cancelForwarding(not_null<History*> history) {
_history->updateForwarding();
}
void MainWidget::finishForwarding(not_null<History*> history, bool silent) {
void MainWidget::finishForwarding(Api::SendAction action) {
const auto history = action.history;
auto toForward = history->validateForwardDraft();
if (!toForward.empty()) {
const auto error = GetErrorTextForForward(history->peer, toForward);
@@ -688,9 +689,7 @@ void MainWidget::finishForwarding(not_null<History*> history, bool silent) {
return;
}
auto options = ApiWrap::SendOptions(history);
options.silent = silent;
session().api().forwardMessages(std::move(toForward), options);
session().api().forwardMessages(std::move(toForward), action);
cancelForwarding(history);
}