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:
@@ -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());
|
||||
|
Reference in New Issue
Block a user