mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-02 07:25:46 +00:00
Ask for boosts to unlock group restrictions.
This commit is contained in:
@@ -52,7 +52,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "apiwrap.h"
|
||||
#include "dialogs/dialogs_widget.h"
|
||||
#include "history/history_widget.h"
|
||||
#include "history/history_item_helpers.h" // GetErrorTextForSending.
|
||||
#include "history/history_item_helpers.h" // GetErrorForSending.
|
||||
#include "history/view/media/history_view_media.h"
|
||||
#include "history/view/history_view_service_message.h"
|
||||
#include "history/view/history_view_sublist_section.h"
|
||||
@@ -556,15 +556,15 @@ bool MainWidget::setForwardDraft(
|
||||
const auto history = thread->owningHistory();
|
||||
const auto items = session().data().idsToItems(draft.ids);
|
||||
const auto topicRootId = thread->topicRootId();
|
||||
const auto error = GetErrorTextForSending(
|
||||
const auto error = GetErrorForSending(
|
||||
history->peer,
|
||||
{
|
||||
.topicRootId = topicRootId,
|
||||
.forward = &items,
|
||||
.ignoreSlowmodeCountdown = true,
|
||||
});
|
||||
if (!error.isEmpty()) {
|
||||
_controller->show(Ui::MakeInformBox(error));
|
||||
if (error) {
|
||||
Data::ShowSendErrorToast(_controller, history->peer, error);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -611,12 +611,12 @@ bool MainWidget::sendPaths(
|
||||
not_null<Data::Thread*> thread,
|
||||
const QStringList &paths) {
|
||||
if (!Data::CanSendAnyOf(thread, Data::FilesSendRestrictions())) {
|
||||
_controller->show(Ui::MakeInformBox(
|
||||
tr::lng_forward_send_files_cant()));
|
||||
_controller->showToast(
|
||||
tr::lng_forward_send_files_cant(tr::now));
|
||||
return false;
|
||||
} else if (const auto error = Data::AnyFileRestrictionError(
|
||||
thread->peer())) {
|
||||
_controller->show(Ui::MakeInformBox(*error));
|
||||
Data::ShowSendErrorToast(controller(), thread->peer(), error);
|
||||
return false;
|
||||
} else {
|
||||
_controller->showThread(
|
||||
@@ -659,12 +659,12 @@ bool MainWidget::filesOrForwardDrop(
|
||||
}
|
||||
return false;
|
||||
} else if (!Data::CanSendAnyOf(thread, Data::FilesSendRestrictions())) {
|
||||
_controller->show(Ui::MakeInformBox(
|
||||
tr::lng_forward_send_files_cant()));
|
||||
_controller->showToast(
|
||||
tr::lng_forward_send_files_cant(tr::now));
|
||||
return false;
|
||||
} else if (const auto error = Data::AnyFileRestrictionError(
|
||||
thread->peer())) {
|
||||
_controller->show(Ui::MakeInformBox(*error));
|
||||
Data::ShowSendErrorToast(_controller, thread->peer(), error);
|
||||
return false;
|
||||
} else {
|
||||
_controller->showThread(
|
||||
|
Reference in New Issue
Block a user