take on account priorities, which are <= 0
This commit is contained in:
		
							parent
							
								
									312dee8b63
								
							
						
					
					
						commit
						335870646d
					
				
					 1 changed files with 5 additions and 2 deletions
				
			
		|  | @ -324,8 +324,11 @@ class Contacts: | ||||||
| 					max_order = data_['order'] | 					max_order = data_['order'] | ||||||
| 		contact = self.get_contact_with_highest_priority(account, jid) | 		contact = self.get_contact_with_highest_priority(account, jid) | ||||||
| 		score = (max_order - order)*10000 | 		score = (max_order - order)*10000 | ||||||
| 		if not common.gajim.jid_is_transport(jid): | 		 | ||||||
| 			score += contact.priority*10 | 		if common.gajim.get_transport_name_from_jid(jid) is None: | ||||||
|  | 			score += 10 | ||||||
|  | 			if contact.priority > 0: | ||||||
|  | 				score += contact.priority * 10 | ||||||
| 		score += ['not in roster', 'error', 'offline', 'invisible', 'dnd', 'xa', | 		score += ['not in roster', 'error', 'offline', 'invisible', 'dnd', 'xa', | ||||||
| 		'away', 'chat', 'online', 'requested', 'message'].index(contact.show) | 		'away', 'chat', 'online', 'requested', 'message'].index(contact.show) | ||||||
| 		return score | 		return score | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue