Don't reply while asked to join the group.
This commit is contained in:
		
							parent
							
								
									f5f374d933
								
							
						
					
					
						commit
						d01c026521
					
				
					 2 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
					@ -2175,7 +2175,8 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
 | 
				
			||||||
			const auto topic = item->topic();
 | 
								const auto topic = item->topic();
 | 
				
			||||||
			return topic
 | 
								return topic
 | 
				
			||||||
				? Data::CanSendAnything(topic)
 | 
									? Data::CanSendAnything(topic)
 | 
				
			||||||
				: Data::CanSendAnything(peer);
 | 
									: (Data::CanSendAnything(peer)
 | 
				
			||||||
 | 
										&& (!peer->isChannel() || peer->asChannel()->amIn()));
 | 
				
			||||||
		}();
 | 
							}();
 | 
				
			||||||
		if (canReply) {
 | 
							if (canReply) {
 | 
				
			||||||
			_menu->addAction(tr::lng_context_reply_msg(tr::now), [=] {
 | 
								_menu->addAction(tr::lng_context_reply_msg(tr::now), [=] {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6832,6 +6832,9 @@ void HistoryWidget::replyToMessage(FullMsgId itemId) {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void HistoryWidget::replyToMessage(not_null<HistoryItem*> item) {
 | 
					void HistoryWidget::replyToMessage(not_null<HistoryItem*> item) {
 | 
				
			||||||
 | 
						if (isJoinChannel()) {
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	_processingReplyId = item->id;
 | 
						_processingReplyId = item->id;
 | 
				
			||||||
	_processingReplyItem = item;
 | 
						_processingReplyItem = item;
 | 
				
			||||||
	processReply();
 | 
						processReply();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue