From 335870646d6651f5b2b75f5ffc16485ec18ba5a7 Mon Sep 17 00:00:00 2001 From: Dimitur Kirov Date: Fri, 14 Jul 2006 07:13:59 +0000 Subject: [PATCH] take on account priorities, which are <= 0 --- src/common/contacts.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/common/contacts.py b/src/common/contacts.py index e04df52d2..8e8206917 100644 --- a/src/common/contacts.py +++ b/src/common/contacts.py @@ -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