[telepathy-butterfly/master] Don't try to add an already allowed contact to the publish list

Louis-Francis Ratté-Boulianne louis-francis.ratte-boulianne at collabora.co.uk
Tue Aug 4 14:05:31 PDT 2009


---
 butterfly/channel/contact_list.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/butterfly/channel/contact_list.py b/butterfly/channel/contact_list.py
index bf299bc..1e7c53e 100644
--- a/butterfly/channel/contact_list.py
+++ b/butterfly/channel/contact_list.py
@@ -295,6 +295,9 @@ class ButterflyPublishListChannel(ButterflyListChannel,
     def _add(self, handle_id, message, finished_cb):
         handle = self._conn.handle(telepathy.HANDLE_TYPE_CONTACT, handle_id)
         contact = handle.contact
+        if contact is not None and contact.is_member(papyon.Membership.ALLOW):
+            return True
+
         account = handle.account
         network = handle.network
         ab = self._conn.msn_client.address_book
-- 
1.5.6.5




More information about the telepathy-commits mailing list