Empathy chat accounts and GOA

Two years ago the first version of GNOME Online Accounts (GOA) was released and Empathy got the ability to use the GOA accounts that supported chat. This feature was a bit incomplete as you could configure Google and Facebook accounts in the control center (through GOA), but the other accounts could only be configured directly in Empathy. Similarly, you could use, but not modify, GOA accounts in Empathy. This problem was not fixed before as it required a lot of work, even if (from a user point of view) it was just a matter of moving some UI around.

In the last month at Collabora I worked hard on fixing this issue (and it took more than 160 patches in several components) and now you can configure every type of IM account in the control center.
All of this was done without breaking compatibility. If your program uses the Telepathy API nothing will change; if your program uses the GOA API then it will also able to handle Telepathy accounts.
This was also a good chance to fix several UI issues (mainly misaligned widgets and too much/too little spacing between widgets), see what the old UI looked like.

Adding a new account in GNOME Control Center
Adding a new account in GNOME Control Center (click for a bigger version)

Personal Details dialog
Personal Details dialog (click for a bigger version)

The task is not 100% finished yet as Empathy still opens its own accounts dialog instead of the control center and there are also a few other UI improvements to make.

Thanks to Emanuele for starting the job, Rishi and Guillaume for the help and the reviews, Allan for the designs, and Intel for sponsoring the bulk of the work.

Permanent IM notifications

Update: the extension is now available on extensions.gnome.org.

Gnome 3 and the shell look really great, but there are a few things that annoy me. My main complaint is that I keep missing IM messages because there is no visual clue that you got a message (unless you are staring at the bottom of your screen exactly when you receive something).
This problem will probably be fixed in the next version of Gnome, see bug #641723, but I wanted something now. That’s why I wrote a simple extension that just displays the number of conversations with unread messages. To install it, just clone the git repository and execute “make install”.

Spot the difference
Spot the difference

The extension is unpolished, it does very little, the code is horrible and I didn’t pay any attention to usability; I just wanted a quick fix while waiting for upstream to fix the bug properly. Nevertheless, I hope this code will be useful for other people too!

Disappearing plugins

If you have any application that adds buttons to the address book (like the contacts merger), you could have noticed that the buttons recently disappeared. This happened because of a bug in Monorail, the IM file transfer application.
Alban already fixed this bug and uploaded a new version to extras-devel. This new version also fixes other bugs, including a crash caused by the sharing plugin in Conboy.

Update: Note that you need to reboot or kill osso-addressbook after updating monorail to see the plugins again.


During the Christmas holidays I managed to find some time to write a couple of small programs related to the address book on the N900; they are nothing too fancy (no UI, no proper packaging, not the best code quality, etc.) as I wrote them for my personal use, but I still think it could be useful to share them with other people.

The one I’m talking about today is a simple command-line utility that adds an email address to your contacts based on the Jabber ID (or on the ID of other protocols). This is very useful to me as in Collabora we all have a roster automatically filled with the other Collaborans, this way I can automatically have their email addresses in my address book.

This cannot be done automatically for all the contact as, usually, it’s not true that a Jabber ID is also a valid email address (for instance it’s not true for jabber.org users), but it’s true at least for the GMail and Collabora servers.

If you want to try jid-to-email get the already compiled arm executable or the source code. Remember to take a backup before trying it, I don’t want to be blamed if something goes horribly wrong ;).

The program accepts two arguments: the vcard field for the IM protocol and a regular expression. For instance, if you cd to the directory where the program is and do “./jid-to-email X-JABBER @collabora.co.uk”, an email address will be added to all the contacts that have a Jabber ID containing “@collabora.co.uk”. Similarly “./jid-to-email X-JABBER ‘@g(oogle)?mail.com’” will add an email address to all the contacts with a Jabber ID containing “@gmail.com” or “@googlemail.com”. You could also try using “X-MSN” to do the same thing for contacts that use their GMail address as MSN ID.

Please, let me know if you know any other server where the Jabber ID is always a valid email address.

By the way, this week-end I’m going to Brussels for FOSDEM: hope to meet a lot of GNOME people there!

I'm going to FOSDEM, the Free and Open Source Software Developers' European Meeting

New #empathy IRC channel

In the last months the traffic on the #telepathy IRC channel on Freenode has been constantly growing, reaching the point where communication among developers is difficult and, at the same time, some new Empathy users are scared and don’t talk on the channel. This is why we just created a new #empathy channel on GIMPNet (irc.gnome.org) for all the empathy users, while #telepathy will be used for development-related discussions.

See you all on #empathy!

Contacts on Maemo

After the Maemo Summit the details on the address book application and framework in Maemo 5 are finally completely public so I can openly talk about what I worked on during the past year and, even better, I actually have a smartphone that runs this software! (Thanks to Nokia that gave out 300 N900s, but I will talk about this in my next post)

Contacts on the N900
Contacts on the N900

Contact details
Contact details

As you can see from the screenshots, the Contacts application has everything you would expect from a normal phone address book but it also tightly integrates IM. Your local, Jabber/GTalk and Skype contacts will appear in the same address book and, if you have a friend on multiple IM protocols, you can easily merge all the contacts into a single entity.

My main task has been making the component responsible for the IM part of the address book work properly, this component is an evolution-data-server backend (recently released under LGPL) that acts as a bridge between the Telepathy IM framework and evolution-data-server. See the README file for more details.
Sadly the library on top of evolution-data-server that does the magic contact merging and contains the widgets used on Maemo is not open, but there is some hope for it.

Address book components
Address book components

At the Maemo Summit I also gave a talk on Telepathy and how it’s used on Maemo, both for messaging/VOIP and for the contacts integration. The slides are available in PDF or in OpenOffice.org format (but for some reason colours look wrong in some recent versions of OpenOffice).

SOCKS5 in telepathy-gabble

In the Telepathy framework there is a mechanism, called tubes, for arbitrary data transfer with your IM contacts so you can play games, do collaborative editing, etc. Until now telepathy-gabble (the component that does XMPP) supported only in-band bytestreams, or IBB for short: all the data is sent inside the XMPP stream encoded in base64. The pro of IBB is that you don’t have to worry about NATs or listening on new ports but on the other hand it’s slow and could use too many resources on the server.

In the long term we want to use Jingle also for data transfer and not only for audio/video calls, but in the meantime we needed something better than IBB so Guillaume Desmottes and I started to implement SOCKS5 bytestreams support in telepathy-gabble. With SOCKS5 bytestreams you just send a list of IP addresses, both yours and the ones for possible intermediate proxies, when you want to start a bytestream. The other side tries to connect to the addresses it received and, when it succeeds connecting to one of them, sends the working address back to the initiator. This leads to three possible results: a direct connection, a connection through a proxy (still better than with IBB as you don’t use base64 and the proxy can be a separate machine from the XMPP server) or just fail if no connection is possible.

In XMPP you decide whether to use SOCKS5 or IBB using a negotiation method called stream initiation that allows the choice of a single bytestream method, if it fails you cannot fallback to the slow but safe IBB. Just failing is not acceptable as the applications running fine with just IBB could stop working for somebody, so we decided to extend stream initiation. With our simple extension we can keep compatibility but also be able to try SOCKS5 and, in case of failure, switch to IBB.

With fallback we were able to finally merge the SOCKS5 branch, so now the next two steps are adding support for intermediate proxies (for now we do only direct connections), and add file transfer using the same bytestream mechanisms. Hope to have good news about this soon :)