Remove redundant null checks.
This commit is contained in:
		
							parent
							
								
									07f5bf223f
								
							
						
					
					
						commit
						8eb48d4533
					
				
					 1 changed files with 1 additions and 5 deletions
				
			
		|  | @ -146,11 +146,7 @@ class PrivateChatControl(ChatControl): | ||||||
| 		""" | 		""" | ||||||
| 		Call this method to send the message | 		Call this method to send the message | ||||||
| 		""" | 		""" | ||||||
| 		if not message: |  | ||||||
| 			return |  | ||||||
| 
 |  | ||||||
| 		message = helpers.remove_invalid_xml_chars(message) | 		message = helpers.remove_invalid_xml_chars(message) | ||||||
| 
 |  | ||||||
| 		if not message: | 		if not message: | ||||||
| 			return | 			return | ||||||
| 
 | 
 | ||||||
|  | @ -158,7 +154,7 @@ class PrivateChatControl(ChatControl): | ||||||
| 		# the recipient did not go away | 		# the recipient did not go away | ||||||
| 		contact = gajim.contacts.get_first_contact_from_jid(self.account, | 		contact = gajim.contacts.get_first_contact_from_jid(self.account, | ||||||
| 			self.contact.jid) | 			self.contact.jid) | ||||||
| 		if contact is None: | 		if not contact: | ||||||
| 			# contact was from pm in MUC | 			# contact was from pm in MUC | ||||||
| 			room, nick = gajim.get_room_and_nick_from_fjid(self.contact.jid) | 			room, nick = gajim.get_room_and_nick_from_fjid(self.contact.jid) | ||||||
| 			gc_contact = gajim.contacts.get_gc_contact(self.account, room, nick) | 			gc_contact = gajim.contacts.get_gc_contact(self.account, room, nick) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue