diff options
author | Krzysztof Klinikowski <kkszysiu@gmail.com> | 2010-04-08 22:45:09 +0200 |
---|---|---|
committer | Krzysztof Klinikowski <kkszysiu@gmail.com> | 2010-04-08 22:45:09 +0200 |
commit | 9b47417aa8dd8eb209a3a2a8ffef2e8ace96e0df (patch) | |
tree | ddfc1758c290283b54b45bf7c7b79eceda73ccf2 | |
parent | f5540a41be97210d194263d0bf21170524469c69 (diff) |
Fixes in capabilities.
-rw-r--r-- | sunshine/capabilities.py | 7 | ||||
-rw-r--r-- | sunshine/channel/contact_list.py | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sunshine/capabilities.py b/sunshine/capabilities.py index e74759a..d5276cd 100644 --- a/sunshine/capabilities.py +++ b/sunshine/capabilities.py @@ -138,16 +138,13 @@ class SunshineCapabilities(telepathy.server.ConnectionInterfaceCapabilities, signature='ua(a{sv}as)') self.ContactCapabilitiesChanged(updated) - # papyon.event.ContactEventInterface def on_contact_client_capabilities_changed(self, contact): self._update_capabilities(contact) - # papyon.event.AddressBookEventInterface - def on_contact_added(self, contact): + + def contactAdded(self, handle): """When we add a contact in our contact list, add the capabilities to create text channel to the contact""" - handle = SunshineHandleFactory(self._conn_ref(), 'contact', - str(contact), None) self.add_text_capabilities([handle]) def add_text_capabilities(self, contacts_handles): diff --git a/sunshine/channel/contact_list.py b/sunshine/channel/contact_list.py index 9ec893e..63bcaa4 100644 --- a/sunshine/channel/contact_list.py +++ b/sunshine/channel/contact_list.py @@ -179,6 +179,8 @@ class SunshineListChannel( if ad or lp or rp: handle = SunshineHandleFactory(self._conn_ref(), 'contact', contact.uin, None) + #capabilities + self._conn_ref().contactAdded(handle) if ad: added.add(handle) if lp: local_pending.add(handle) if rp: remote_pending.add(handle) @@ -229,9 +231,10 @@ class SunshineSubscribeListChannel(SunshineListChannel): #and group if self._conn_ref().pending_contacts_to_group.has_key(handle.name): logger.info("Trying to add temporary group.") - print str(self._conn_ref().pending_contacts_to_group) - print str(self._conn_ref().pending_contacts_to_group[handle.name]) + #print str(self._conn_ref().pending_contacts_to_group) + #print str(self._conn_ref().pending_contacts_to_group[handle.name]) handle.contact.updateGroups(self._conn_ref().pending_contacts_to_group[handle.name]) + self._conn_ref().contactAdded(handle) logger.info("Contact added.") def RemoveMembers(self, contacts, message): |