Skip to content
Snippets Groups Projects
Commit 33587064 authored by dkirov's avatar dkirov
Browse files

take on account priorities, which are <= 0

parent 312dee8b
No related branches found
No related tags found
No related merge requests found
......@@ -324,8 +324,11 @@ class Contacts:
max_order = data_['order']
contact = self.get_contact_with_highest_priority(account, jid)
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',
'away', 'chat', 'online', 'requested', 'message'].index(contact.show)
return score
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment