Removed ability to copy links in channels with restricted content.

This commit is contained in:
23rd 2022-09-27 22:32:58 +03:00
parent 9c3173e4bb
commit 9cd194e60e
2 changed files with 4 additions and 2 deletions

View File

@ -2364,7 +2364,7 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
}
}
}
if (!actionText.isEmpty()) {
if (!actionText.isEmpty() && !hasCopyRestriction(item)) {
_menu->addAction(
actionText,
[text = link->copyToClipboardText()] {

View File

@ -1001,7 +1001,9 @@ base::unique_qptr<Ui::PopupMenu> FillContextMenu(
}
}
AddCopyLinkAction(result, link);
if (!list->hasCopyRestriction(view->data())) {
AddCopyLinkAction(result, link);
}
AddMessageActions(result, request, list);
if (item) {