From a216a19f3f62eba01de33db81143c2d6e54f568e Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mon, 24 Jul 2006 10:57:02 -0500 Subject: [PATCH] Re-enable ActivityChat service existing chat service detection code --- sugar/chat/ActivityChat.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sugar/chat/ActivityChat.py b/sugar/chat/ActivityChat.py index 85e61bf2..8fafcb99 100644 --- a/sugar/chat/ActivityChat.py +++ b/sugar/chat/ActivityChat.py @@ -10,13 +10,14 @@ class ActivityChat(GroupChat): self._chat_service = None self._activity = activity + self._pservice.register_service_type(ActivityChat.SERVICE_TYPE) self._pservice.connect('service-appeared', self._service_appeared_cb) # Find an existing activity chat to latch onto - #activity_ps = self._pservice.getActivity(activity.get_id()) - #service = activity.getServiceOfType(ActivityChat.SERVICE_TYPE) - #if service is not None: - # self._service_appeared_cb(self._pservice, None, service) + activity_ps = self._pservice.get_activity(activity.get_id()) + service = activity_ps.get_service_of_type(ActivityChat.SERVICE_TYPE) + if service is not None: + self._service_appeared_cb(self._pservice, None, service) def _service_appeared_cb(self, pservice, buddy, service): if service.get_activity_id() != self._activity.get_id():