[Sugar-devel] [PATCH sugar] Anly approve and not handle channels in the shell, part of OLPC #10738
Sascha Silbe
sascha-ml-reply-to-2011-2 at silbe.org
Fri Apr 15 17:47:46 EDT 2011
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 <silbe at activitycentral.com>
Sascha
--
http://sascha.silbe.org/
http://www.infra-silbe.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 500 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20110415/4e15d176/attachment.pgp>
More information about the Sugar-devel
mailing list