Sort the unavailable contacts at the end of the contact list

This commit is contained in:
mathieui 2012-08-01 01:24:42 +02:00
parent 71f813af28
commit 47c593ddaf

View file

@ -243,7 +243,7 @@ def sort_jid(contact):
def sort_show(contact):
res = contact.get_highest_priority_resource()
if not res:
return 0
return 5
show = res.presence
if show not in PRESENCE_PRIORITY:
return 0