[Elmar Hoffmann] prefer contacts on the same server as you in metacontacts. fixes #3649

This commit is contained in:
Yann Leboulanger 2008-01-06 11:12:07 +00:00
parent 1b5b9138a4
commit 2aef21f026
1 changed files with 9 additions and 0 deletions

View File

@ -475,6 +475,15 @@ class Contacts:
return 1
if show2 > show1:
return -1
server1 = gajim.get_server_from_jid(jid1)
server2 = gajim.get_server_from_jid(jid2)
myserver1 = gajim.config.get_per('accounts', account1, 'hostname')
myserver2 = gajim.config.get_per('accounts', account2, 'hostname')
if server1 == myserver1:
if server2 != myserver2:
return 1
elif server2 == myserver2:
return -1
if jid1 > jid2:
return 1
if jid2 > jid1: