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

Prepare legacy group restrictions checking.

This commit is contained in:
John Preston
2019-01-05 14:50:04 +04:00
parent 441989a8e1
commit 61419b57c8
25 changed files with 415 additions and 403 deletions

View File

@@ -565,11 +565,9 @@ bool MainWidget::sendPaths(PeerId peerId) {
if (!peer->canWrite()) {
Ui::show(Box<InformBox>(lang(lng_forward_send_files_cant)));
return false;
} else if (auto megagroup = peer->asMegagroup()) {
if (megagroup->restricted(ChatRestriction::f_send_media)) {
Ui::show(Box<InformBox>(lang(lng_restricted_send_media)));
return false;
}
} else if (peer->amRestricted(ChatRestriction::f_send_media)) {
Ui::show(Box<InformBox>(lang(lng_restricted_send_media)));
return false;
}
Ui::showPeerHistory(peer, ShowAtTheEndMsgId);
return _history->confirmSendingFiles(cSendPaths());