awsome stuff on all the telepathy related stuff... I'm no expert, but looks like things became more homologised and is now used more in line with the way empathy and others run under gnome to use telepathy... Maybe I'm reading too much into this, but does this effectively mean that we can now communicate with any telepathy based client on other systems from a sugar based system?<br>
<br>Perhaps you could explain how this effects activity sharing across activities on other oses (say chat client on gnome with sugar chat?)<br><br>kind regards,<br>David Van Assche<br><br><div class="gmail_quote">On Thu, Apr 14, 2011 at 7:42 PM, Simon Schampijer <span dir="ltr"><<a href="mailto:simon@schampijer.de">simon@schampijer.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">We only approve channels in the shell and do not claim to handle them<br>
anymore. The handling is now done by the activity (toolkit patch).<br>
More info about approving and handling of channels can be found at [1].<br>
<br>
This patch does as well only handle sugar activity invitations, invitations<br>
from non-sugar clients will be handled in a separate patch.<br>
<br>
[1] <a href="http://telepathy.freedesktop.org/doc/book/sect.channel-dispatcher.clients.html" target="_blank">http://telepathy.freedesktop.org/doc/book/sect.channel-dispatcher.clients.html</a><br>
<br>
Signed-off-by: Simon Schampijer <<a href="mailto:simon@laptop.org">simon@laptop.org</a>><br>
---<br>
 src/jarabe/model/telepathyclient.py |   21 ++++++++++++++++-----<br>
 1 files changed, 16 insertions(+), 5 deletions(-)<br>
<br>
diff --git a/src/jarabe/model/telepathyclient.py b/src/jarabe/model/telepathyclient.py<br>
index c6fbac1..cea8693 100644<br>
--- a/src/jarabe/model/telepathyclient.py<br>
+++ b/src/jarabe/model/telepathyclient.py<br>
@@ -19,11 +19,16 @@ import logging<br>
 import dbus<br>
 from dbus import PROPERTIES_IFACE<br>
 from telepathy.interfaces import CLIENT, \<br>
+                                 CHANNEL, \<br>
+                                 CHANNEL_TYPE_TEXT, \<br>
                                  CLIENT_APPROVER, \<br>
                                  CLIENT_HANDLER, \<br>
                                  CLIENT_INTERFACE_REQUESTS<br>
 from telepathy.server import DBusProperties<br>
<br>
+from telepathy.constants import CONNECTION_HANDLE_TYPE_CONTACT<br>
+from telepathy.constants import CONNECTION_HANDLE_TYPE_ROOM<br>
+<br>
 from sugar import dispatch<br>
<br>
<br>
@@ -48,9 +53,6 @@ class TelepathyClient(dbus.service.Object, DBusProperties):<br>
         self._implement_property_get(CLIENT, {<br>
             'Interfaces': lambda: list(self._interfaces),<br>
           })<br>
-        self._implement_property_get(CLIENT_HANDLER, {<br>
-            'HandlerChannelFilter': self.__get_filters_cb,<br>
-          })<br>
         self._implement_property_get(CLIENT_APPROVER, {<br>
             'ApproverChannelFilter': self.__get_filters_cb,<br>
           })<br>
@@ -60,8 +62,17 @@ class TelepathyClient(dbus.service.Object, DBusProperties):<br>
<br>
     def __get_filters_cb(self):<br>
         logging.debug('__get_filters_cb')<br>
-        filter_dict = dbus.Dictionary({}, signature='sv')<br>
-        return dbus.Array([filter_dict], signature='a{sv}')<br>
+<br>
+        filt = {<br>
+            CHANNEL + '.ChannelType': CHANNEL_TYPE_TEXT,<br>
+            CHANNEL + '.TargetHandleType': CONNECTION_HANDLE_TYPE_ROOM,<br>
+            }<br>
+        filter_dict = dbus.Dictionary(filt, signature='sv')<br>
+        filters = dbus.Array([filter_dict], signature='a{sv}')<br>
+<br>
+        logging.debug('__get_filters_cb %r', filters)<br>
+<br>
+        return filters<br>
<br>
     @dbus.service.method(dbus_interface=CLIENT_HANDLER,<br>
                          in_signature='ooa(oa{sv})aota{sv}', out_signature='')<br>
<font color="#888888">--<br>
1.7.4<br>
<br>
_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
</font></blockquote></div><br>