Quick fix for 'Cant forward here' error.
This commit is contained in:
		
							parent
							
								
									b814c6307a
								
							
						
					
					
						commit
						7316d24ca4
					
				
					 1 changed files with 12 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -2858,13 +2858,15 @@ void HistoryWidget::send(bool silent, Qt::KeyboardModifiers modifiers) {
 | 
			
		|||
	message.silent = silent;
 | 
			
		||||
	message.handleSupportSwitch = Support::HandleSwitch(modifiers);
 | 
			
		||||
 | 
			
		||||
	const auto error = GetErrorTextForForward(
 | 
			
		||||
		_peer,
 | 
			
		||||
		_toForward,
 | 
			
		||||
		message.textWithTags);
 | 
			
		||||
	if (!error.isEmpty()) {
 | 
			
		||||
		ShowErrorToast(error);
 | 
			
		||||
		return;
 | 
			
		||||
	if (_canSendMessages) {
 | 
			
		||||
		const auto error = GetErrorTextForForward(
 | 
			
		||||
			_peer,
 | 
			
		||||
			_toForward,
 | 
			
		||||
			message.textWithTags);
 | 
			
		||||
		if (!error.isEmpty()) {
 | 
			
		||||
			ShowErrorToast(error);
 | 
			
		||||
			return;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	session().api().sendMessage(std::move(message));
 | 
			
		||||
| 
						 | 
				
			
			@ -5280,7 +5282,9 @@ void HistoryWidget::keyPressEvent(QKeyEvent *e) {
 | 
			
		|||
			const auto submitting = Ui::InputField::ShouldSubmit(
 | 
			
		||||
				session().settings().sendSubmitWay(),
 | 
			
		||||
				e->modifiers());
 | 
			
		||||
			send(false, e->modifiers());
 | 
			
		||||
			if (submitting) {
 | 
			
		||||
				send(false, e->modifiers());
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	} else if (e->key() == Qt::Key_O && e->modifiers() == Qt::ControlModifier) {
 | 
			
		||||
		chooseAttach();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue