Restore use of ActivityProperties.GetActivity

This commit is contained in:
Tomeu Vizoso 2010-07-13 13:57:03 +02:00
parent 46159e987b
commit af6e3aa5ef

View File

@ -267,13 +267,16 @@ class PresenceService(gobject.GObject):
connection_manager = get_connection_manager() connection_manager = get_connection_manager()
connections_per_account = connection_manager.get_connections_per_account() connections_per_account = connection_manager.get_connections_per_account()
for account_path, connection in connections_per_account.items(): for account_path, connection in connections_per_account.items():
room_handles = connection.RequestHandles(HANDLE_TYPE_ROOM, try:
[activity_id], room_handle = connection.GetActivity(activity_id)
dbus_interface=CONNECTION) except dbus.exceptions.DBusException, e:
activity = Activity(account_path, connection, if e.get_dbus_name() != 'org.freedesktop.Telepathy.Error.NotAvailable':
room_handle=room_handles[0]) raise
self._activity_cache = activity else:
return activity activity = Activity(account_path, connection,
room_handle=room_handle)
self._activity_cache = activity
return activity
return None return None