2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Allow sending silent messages.

This commit is contained in:
John Preston
2019-07-26 18:06:22 +02:00
parent f1cd70d8a8
commit 3f2cc01f48
16 changed files with 118 additions and 66 deletions

View File

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