Fix TB when getting score of a not (yet) in the roster contact. fixes #3382 and #3335

This commit is contained in:
Yann Leboulanger 2007-08-21 09:23:34 +00:00
parent aabe6db039
commit ba8b8bca31
1 changed files with 5 additions and 2 deletions

View File

@ -431,9 +431,12 @@ class Contacts:
for data_ in family:
if data_.has_key('order') and data_['order'] > max_order:
max_order = data_['order']
contact = self.get_contact_with_highest_priority(account, jid)
score = (max_order - order)*10000
contact = self.get_contact_with_highest_priority(account, jid)
if not contact:
return score
if common.gajim.get_transport_name_from_jid(jid) is None and \
contact.show not in ('error', 'offline'):
score += 10