mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-25 01:50:36 +00:00
Disable external replies for non-forwardable.
This commit is contained in:
parent
b793c06759
commit
1341907cfd
@ -2391,15 +2391,7 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
|
||||
: (Data::CanSendAnything(peer)
|
||||
&& (!peer->isChannel() || peer->asChannel()->amIn()));
|
||||
}();
|
||||
const auto canReply = canSendReply || [&] {
|
||||
const auto peer = item->history()->peer;
|
||||
if (const auto chat = peer->asChat()) {
|
||||
return !chat->isForbidden();
|
||||
} else if (const auto channel = peer->asChannel()) {
|
||||
return !channel->isForbidden();
|
||||
}
|
||||
return true;
|
||||
}();
|
||||
const auto canReply = canSendReply || item->allowsForward();
|
||||
if (canReply) {
|
||||
const auto itemId = item->fullId();
|
||||
const auto quote = selectedQuote(item);
|
||||
|
@ -650,14 +650,16 @@ void DraftOptionsBox(
|
||||
const auto setupReplyActions = [=] {
|
||||
AddFilledSkip(bottom);
|
||||
|
||||
Settings::AddButton(
|
||||
bottom,
|
||||
tr::lng_reply_in_another_chat(),
|
||||
st::settingsButton,
|
||||
{ &st::menuIconReplace }
|
||||
)->setClickedCallback([=] {
|
||||
ShowReplyToChatBox(show, resolveReply(), clearOldDraft);
|
||||
});
|
||||
if (replyItem->allowsForward()) {
|
||||
Settings::AddButton(
|
||||
bottom,
|
||||
tr::lng_reply_in_another_chat(),
|
||||
st::settingsButton,
|
||||
{ &st::menuIconReplace }
|
||||
)->setClickedCallback([=] {
|
||||
ShowReplyToChatBox(show, resolveReply(), clearOldDraft);
|
||||
});
|
||||
}
|
||||
|
||||
Settings::AddButton(
|
||||
bottom,
|
||||
|
@ -592,15 +592,7 @@ bool AddReplyToMessageAction(
|
||||
const auto canSendReply = topic
|
||||
? Data::CanSendAnything(topic)
|
||||
: Data::CanSendAnything(peer);
|
||||
const auto canReply = canSendReply || [&] {
|
||||
const auto peer = item->history()->peer;
|
||||
if (const auto chat = peer->asChat()) {
|
||||
return !chat->isForbidden();
|
||||
} else if (const auto channel = peer->asChannel()) {
|
||||
return !channel->isForbidden();
|
||||
}
|
||||
return true;
|
||||
}();
|
||||
const auto canReply = canSendReply || item->allowsForward();
|
||||
if (!canReply) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user