# -----------------------------------------------------------------------
def process_contact(self, contact):
- if self._friends_by_contact.has_key(contact):
- return
+ if self._friends_by_contact.has_key(contact) or \
+ self._match_contact_to_friend_by_urls(contact) or \
+ self._match_contact_to_friend_by_identifiers(contact):
+ return self._get_friend_by_contact(contact)
- if self._match_contact_to_friend_by_urls(contact):
- return
-
- self._match_contact_to_friend_by_identifiers(contact)
+ return None
# -----------------------------------------------------------------------
# -----------------------------------------------------------------------
def _get_tweeters(self):
return self._twitter.GetFriends()
+
+
+ # -----------------------------------------------------------------------
+ def _get_friend_by_contact(self, contact):
+ return self._friends_by_contact[contact]
def _match_contact_to_friend_by_urls(self, contact):
def _register_match(self, contact, friend):
+ friend.set_contact(contact)
self._friends_by_contact[contact] = friend
self._friends.remove(friend)