contacts.get_contact() now always returns a list (empty if needed) when no resource is given. Should fix #1821
This commit is contained in:
		
							parent
							
								
									3fbe15edab
								
							
						
					
					
						commit
						0793c64053
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -186,7 +186,9 @@ class Contacts:
 | 
			
		|||
			for c in contacts:
 | 
			
		||||
				if c.resource == resource:
 | 
			
		||||
					return c
 | 
			
		||||
		return None
 | 
			
		||||
		if resource:
 | 
			
		||||
			return None
 | 
			
		||||
		return []
 | 
			
		||||
 | 
			
		||||
	def get_contacts_from_jid(self, account, jid):
 | 
			
		||||
		'''we may have two or more resources on that jid'''
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue