Excerpts from Simon Schampijer's message of Thu Apr 14 19:42:05 +0200 2011:
> We only approve channels in the shell and do not claim to handle them
> anymore. The handling is now done by the activity (toolkit patch).
> More info about approving and handling of channels can be found at [1].
> 

> This patch does as well only handle sugar activity invitations, invitations
> from non-sugar clients will be handled in a separate patch.

s/as well // ?

[src/jarabe/model/telepathyclient.py]
> @@ -60,8 +62,17 @@ class TelepathyClient(dbus.service.Object, DBusProperties):
>  
>      def __get_filters_cb(self):
>          logging.debug('__get_filters_cb')
> -        filter_dict = dbus.Dictionary({}, signature='sv')
> -        return dbus.Array([filter_dict], signature='a{sv}')
> +
> +        filt = {
> +            CHANNEL + '.ChannelType': CHANNEL_TYPE_TEXT,
> +            CHANNEL + '.TargetHandleType': CONNECTION_HANDLE_TYPE_ROOM,
> +            }
> +        filter_dict = dbus.Dictionary(filt, signature='sv')
> +        filters = dbus.Array([filter_dict], signature='a{sv}')
> +
> +        logging.debug('__get_filters_cb %r', filters)
> +
> +        return filters

Given that "filt" is non-empty, do we really need the explicit
conversions? I.e. would the following work?

    def __get_filters_cb(self):
        logging.debug('__get_filters_cb')
        return [{
            CHANNEL + '.ChannelType': CHANNEL_TYPE_TEXT,
            CHANNEL + '.TargetHandleType': CONNECTION_HANDLE_TYPE_ROOM,
            }]

(The content seems to be static, so it wouldn't make sense to log it.)

The general approach looks fine. With or without the above changes, but
after you got Samuels Tested-By:

Acked-By: Sascha Silbe <si...@activitycentral.com>

Sascha

-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel

Reply via email to