[sugar] [PATCH] 1-1 Chat (non-Sugar Jabber clients #6298)

Morgan Collett morgan.collett at gmail.com
Wed May 7 04:03:36 EDT 2008


I've attached patches for Sugar and Chat that handle incoming XMPP 1-1
connections, from a non-Sugar Jabber client.

It's a bit of a proof of concept, because although it works there are
some issues that need improving - so please review and comment... I'm
looking for input from Marco/Tomeu, Eben, Daf/Guillaume...

* From a Jabber client registered on the Jabber server I initiate a
chat with the Buddy.
* Presence Service sends private-invitation to sugar.presence and then
to the shell.
* The signal has the Telepathy channel for this 1-1 connection which
needs to get to Chat.
* I'm (ab)using activityfactory.create_with_uri to launch Chat with
the Telepathy channel in the metadata.
* That makes Chat launch magically. That violates the requirement that
the user initiate the activity.
* I'm using json (probably badly?) to pass the two strings identifying
the Telepathy channel.
* The first message from the non-Sugar client (which initiates the
connection) gets dropped somewhere, and only subsequent messages get
through to Chat.
* Presence Service sends private-invitation on both CHANNEL_TYPE_TEXT
and CHANNEL_TYPE_STREAMED_MEDIA (which should go to video chat
eventually). When we have agreed on how to handle Chat I'll figure out
how to differentiate them and send the media one to video chat.

It has also been suggested that the incoming chat appear as an
invitation. I had a look but couldn't yet figure out how best to
represent something that is not an activity, does not have colors, and
is not a room on the server. Input appreciated.

Thanks
Morgan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sugar_XMPP.diff
Type: text/x-diff
Size: 1846 bytes
Desc: not available
Url : http://lists.laptop.org/pipermail/sugar/attachments/20080507/127dcdf0/attachment.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: chat_XMPP.diff
Type: text/x-diff
Size: 4554 bytes
Desc: not available
Url : http://lists.laptop.org/pipermail/sugar/attachments/20080507/127dcdf0/attachment-0001.diff 


More information about the Sugar mailing list