Don't reply while asked to join the group.

This commit is contained in:
John Preston 2023-03-17 18:34:48 +04:00
parent f5f374d933
commit d01c026521
2 changed files with 5 additions and 1 deletions

View File

@ -2175,7 +2175,8 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
const auto topic = item->topic();
return topic
? Data::CanSendAnything(topic)
: Data::CanSendAnything(peer);
: (Data::CanSendAnything(peer)
&& (!peer->isChannel() || peer->asChannel()->amIn()));
}();
if (canReply) {
_menu->addAction(tr::lng_context_reply_msg(tr::now), [=] {

View File

@ -6832,6 +6832,9 @@ void HistoryWidget::replyToMessage(FullMsgId itemId) {
}
void HistoryWidget::replyToMessage(not_null<HistoryItem*> item) {
if (isJoinChannel()) {
return;
}
_processingReplyId = item->id;
_processingReplyItem = item;
processReply();