contacts.get_contact() now always returns a list (empty if needed) when no resource is given. Should fix #1821
This commit is contained in:
parent
3fbe15edab
commit
0793c64053
|
@ -186,7 +186,9 @@ class Contacts:
|
||||||
for c in contacts:
|
for c in contacts:
|
||||||
if c.resource == resource:
|
if c.resource == resource:
|
||||||
return c
|
return c
|
||||||
return None
|
if resource:
|
||||||
|
return None
|
||||||
|
return []
|
||||||
|
|
||||||
def get_contacts_from_jid(self, account, jid):
|
def get_contacts_from_jid(self, account, jid):
|
||||||
'''we may have two or more resources on that jid'''
|
'''we may have two or more resources on that jid'''
|
||||||
|
|
Loading…
Reference in New Issue