[sugar] [PATCH] Refactor invites for 1-1 Chat (#6298)

Morgan Collett morgan.collett
Mon May 26 08:55:14 EDT 2008


On Mon, May 26, 2008 at 10:26 AM, Guillaume Desmottes
<guillaume.desmottes at collabora.co.uk> wrote:
> Le vendredi 23 mai 2008 ? 17:12 +0200, Morgan Collett a ?crit :
>> I extended the Invites to handle connections for 1-1 connections. This
>> should also handle incoming streaming media connections for VideoChat
>> (when that activity has the necessary bits in place).
>>
>> It depends on Guillaume's patches in http://dev.laptop.org/ticket/6298
>> for presence-service, sugar, sugar-toolkit and chat-activity.
>>
>> I will get this patch up in my git repo, as soon as I can figure out
>> why it won't allow me to push (non-fast forward).
>>
>> It works in jhbuild with incoming XMPP chat giving an invite for Chat,
>> which launches Chat. The only thing not working yet is removing the
>> invite when you click on it.
>>
>> Review please...
>>
>
> diff --git a/src/model/Invites.py b/src/model/Invites.py
>
>         owner.connect('joined-activity', self._owner_joined_cb)
> +        # FIXME need equivalent for ^ for private invite
>
> "of ^ for private" ?

Oh, hmm, I meant to deal with that already...

> I'm not sure about this. This signal is fired by PS but, from its pov,
> private invites are not activities so PS is not aware of them.
> My first guess would be to watch tp channel's members (group interface)
> and catch when the self handle is added as members. But I guess it would
> be good to avoid this kind of Telepathy code in sugar.

OK, I need to dig a bit and see if this case is called when you click
on the icon in mesh view instead of the invite, because I think
clicking on the invite should clean things up anyway. (Although I
still need to figure out why that's not happening with my patch
yet...)

> +    def add_private_invite(self, private_connection, bundle_id):
> private_connection is misnamed (connections are a totally different kind
> of objects in Telepathy). In that case that's a channel.

OK, I'll rename it to private_channel.

> ?diff --git a/src/model/Owner.py b/src/model/Owner.py
>
> _private_invitation_cb's documentation should be updated as it supports
> VideoChat too now.

Thanks.

Morgan



More information about the Sugar-devel mailing list