After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 541156 - Handle xmpp:// links
Handle xmpp:// links
Status: RESOLVED OBSOLETE
Product: empathy
Classification: Core
Component: General
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: empathy-maint
empathy-maint
: 613847 642342 (view as bug list)
Depends on:
Blocks: 565513
 
 
Reported: 2008-07-02 00:22 UTC by Axel Haustant
Modified: 2018-05-22 13:10 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Axel Haustant 2008-07-02 00:22:37 UTC
It would be great to have an xmpp handler for a better desktop integration.
Use case:
 John uses its browser and click on an xmpp links (contact or chatroom) and it opens directly with empathy.

irc://, aim:// and all others are welcome to.
Comment 1 Xavier Claessens 2008-07-04 08:36:28 UTC
Yes, could be great. Could you describe the xmpp:// URI format? is it simply xmpp://user@jabber.org? What empathy is supposed to do, open a chat with the contact or add it the the contact list?
Comment 2 Axel Haustant 2008-07-04 12:26:26 UTC
These chapters briefly describe all formats:
http://microformats.org/wiki/hcard-examples#New_Types_of_Contact_Info
http://en.wikipedia.org/wiki/URI_scheme

xmpp URI format is entirely describe in RFC5122 (which obsoletes RFC4622) and XEP-0147 here:
http://tools.ietf.org/rfc/rfc5122.txt
http://www.ietf.org/rfc/rfc4622.txt
http://www.xmpp.org/extensions/xep-0147.html

For IRC uri, I found these draft:
http://tools.ietf.org/html/draft-butcher-irc-url-04
http://www.w3.org/Addressing/draft-mirashi-url-irc-01.txt
This document form Mozilla Team could be usefull:
http://www.mozilla.org/projects/rt-messaging/chatzilla/irc-urls.html

For AIM, I found this wikipedia topic:
http://en.wikipedia.org/wiki/AOL_Instant_Messenger#URI_scheme
http://www.tech-recipes.com/instant_messaging_tips500.html

For Yahoo Messenger (ymsgr:):
http://www.helpbytes.co.uk/messylinks.php

For MSN (msnim:):
http://www.tech-recipes.com/internet_tips1157.html

RFC3860 describe Common Profile for Internet Messaging  (CPIM):
http://tools.ietf.org/html/rfc3860

I hope this will help.
Comment 3 Frederic Peters 2008-07-18 11:54:58 UTC
It probably should happen lower in the Telepathy stack; then it would do the appopriate D-Bus calls and Empathy would open if appropriate.

Xavier: do you have any idea about the Telepathy component that should handle this?  Care to file a bug there?
Comment 4 Simon McVittie 2008-07-18 12:21:26 UTC
When implementing this sort of thing, remember that URIs are noun phrases, not verb phrases.

xmpp:simon.mcvittie@collabora.co.uk (there is no // by the way, iirc) represents a noun, "Simon" (or possibly "Simon's IM client", depending on your point of view). It does not represent a verb like "talk to Simon", "call Simon", "add Simon to my contact list".

This is why the mailto: URI scheme is misleading - there are many things you can do with an e-mail address (send email to it, add it to your address book, add it to a whitelist/blacklist) - and all the non-standard URI schemes inspired by it, like callto: or voipto:, are wrong.

*In the specific case of XMPP* there is a concept of using query strings to indicate a verb. This doesn't really fit into the URI model, but anyway...

So, you can have (for instance) xmpp:simon.mcvittie@collabora.co.uk?message or xmpp:simon.mcvittie@collabora.co.uk?roster. See XEP-0147.

Understanding URIs is necessarily protocol-specific, so it's inappropriate for "Mission Control" (whatever that means in the new Account Manager/Channel Dispatcher design) to be responsible for it. Empathy already has to have some protocol-specific code, so in the short term it might be appropriate for Empathy to have protocol-specific understanding of URIs.

Rob has some ideas about adding an optional interface on connection managers that deals with URIs (and, in general, "other representations" for contact IDs). This is certainly not a short-term thing, though.
Comment 5 Frederic Peters 2008-07-18 14:13:38 UTC
I am assigning this bug to myself as I'll now work on this.
Comment 6 Frederic Peters 2008-09-07 15:29:20 UTC
As it stalled I will list the two major missing pieces to get it done properly.

 1) no way to get the current list of contacts; there is a callback for add/remove contacts but no way to know when it is complete, which would be required to get the right McAccount (if foo@jabber.org is in the contact list of my "jabber.org" account, xmpp:foo@jabber.org?message... should open a chat window with that account, not with another unrelated "im.apinc.fr" account)

 2) no way to prefill most dialogs, xmpp:foo@jabber.org?roster;name=Foo should open the "new contact" dialog with the jid and alias prefilled; xmpp:foo@jabber.org?message;body=hello should open a chat window with the text box prefilled with "hello".
Comment 7 Eugene Chaikin 2009-03-28 23:52:12 UTC
How I can check this? Something like this?
empathy xmpp:juick@juick.com?message;body=%112233+

It does'nt work. What I doing wrong?
Comment 8 Matěj Cepl 2009-09-22 11:34:49 UTC
Well, I have another question ... how this bug is supposed to be resolved for people with multi-account Empathy? Which account is used? Do we have a concept of "default XMPP/AIM/ICQ/whatever account"?
Comment 9 Stephen Paul Weber 2010-03-11 22:12:36 UTC
Given the Empathy UI, I think the sane way to handle generic xmpp:jid (no query) URIs is to start a conversation with that JID.  If you have multiple XMPP accounts it could pop up a list of them and ask which one to use.
Comment 10 Guillaume Desmottes 2010-03-25 09:38:07 UTC
*** Bug 613847 has been marked as a duplicate of this bug. ***
Comment 11 Guillaume Desmottes 2011-02-15 08:51:43 UTC
From bug #642342:

Something like this I think:
diff --git a/data/empathy.desktop.in.in b/data/empathy.desktop.in.in
index 7cce226..448ff40 100644
--- a/data/empathy.desktop.in.in
+++ b/data/empathy.desktop.in.in
@@ -10,6 +10,7 @@ StartupNotify=false
 Terminal=false
 Type=Application
 Categories=GNOME;GTK;Network;InstantMessaging;
+MimeType=x-scheme-handler/xmpp;
 X-GNOME-Bugzilla-Bugzilla=GNOME
 X-GNOME-Bugzilla-Product=empathy
 X-GNOME-Bugzilla-Component=General
Comment 12 Guillaume Desmottes 2011-02-15 08:51:57 UTC
*** Bug 642342 has been marked as a duplicate of this bug. ***
Comment 13 Guillaume Desmottes 2011-11-07 10:20:24 UTC
For the record: http://wiki.xmpp.org/web/XMPP_URIs


So, I think the right way to implement this is to create a small empathy-uri-handler binary just responsible of handling such URIs. Depending of the action, it will:
- request a text or call channel and let MC dispatch it. Sending some messages if needed.

- Ask empathy (the contact list) to open the "new contact dialog" with some fields pre-filled. This should be done using a specific D-Bus API.

I think those 2 cases are good enough for a start.
Comment 14 Guillaume Desmottes 2011-11-07 10:25:22 UTC
(In reply to comment #13)
> For the record: http://wiki.xmpp.org/web/XMPP_URIs
> - request a text or call channel and let MC dispatch it. Sending some messages
> if needed.

In this case if there is more than one valid account, we should popup the user
asking him to choose the one it wants to use.

> - Ask empathy (the contact list) to open the "new contact dialog" with some
> fields pre-filled. This should be done using a specific D-Bus API.


This is not a problem here as user can easily select another account in the
'new contact' dialog if he wants to.


(In reply to comment #6)
> As it stalled I will list the two major missing pieces to get it done properly.
> 
>  1) no way to get the current list of contacts; there is a callback for
> add/remove contacts but no way to know when it is complete, which would be
> required to get the right McAccount (if foo@jabber.org is in the contact list
> of my "jabber.org" account, xmpp:foo@jabber.org?message... should open a chat
> window with that account, not with another unrelated "im.apinc.fr" account)

This is now doable using contact list API.

>  2) no way to prefill most dialogs, xmpp:foo@jabber.org?roster;name=Foo should
> open the "new contact" dialog with the jid and alias prefilled;
> xmpp:foo@jabber.org?message;body=hello should open a chat window with the text
> box prefilled with "hello".

As said, this should be done using a specific D-Bus API.
Comment 15 GNOME Infrastructure Team 2018-05-22 13:10:17 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/empathy/issues/18.