From 0793c640539789c6d883a200320849188e0d5395 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sun, 9 Apr 2006 09:39:02 +0000 Subject: [PATCH] contacts.get_contact() now always returns a list (empty if needed) when no resource is given. Should fix #1821 --- src/common/contacts.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/contacts.py b/src/common/contacts.py index be377e205..84361b713 100644 --- a/src/common/contacts.py +++ b/src/common/contacts.py @@ -186,7 +186,9 @@ class Contacts: for c in contacts: if c.resource == resource: return c - return None + if resource: + return None + return [] def get_contacts_from_jid(self, account, jid): '''we may have two or more resources on that jid'''