[Kde-pim] Review Request 108837: kaddressbook: display and make clickable all IM addresses

Jonathan Marten jjm at keelhaul.me.uk
Fri Mar 1 09:52:10 GMT 2013



> On Feb. 7, 2013, 9:20 p.m., Martin Klapetek wrote:
> > Hey, adding some input from KDE Telepathy point of view. This unfortunately won't make it possible to start chats with KDE Telepathy. Starting any IM actions with KTp is little bit more complex, where one first needs to initialize the proper components (Telepathy's AccountManager) and then get an account identifier together with unique Telepathy contact identifier; only then one can start chats with KTp. Assuming the IM handle in KAddressBook is that Telepathy contact id, we'd still need the account id, which is usually in form like gabble/jabber/martin_2eklapetek_40gmail_2ecom0. 
> > 
> > We /could/ make a tiny app that loops through all Telepathy contacts and finds a match. But this will work only with connected accounts, otherwise Telepathy does not have a list of account's contacts. However handling Facebook/G+ IM contacts would be impossible as they have non-standard non-human readable contact ids, so we wouldn't find a match there either. 
> > 
> > Finally, this is solved with the shared metacontacts, where you basically connect your Akonadi account with Telepathy account through the means of Nepomuk and you can then start chats etc. I'll be presenting a working demo at the PIM sprint in 3 weeks :)
> 
> Jonathan Marten wrote:
>     Thanks for your input Martin.  Obviously I'd like this feature to properly integrate with Telepathy as well, although not being a heavy IM user I don't use it myself much (I'm only investigating this because of an occasional need to IM with a few specific contacts).
>     
>     As far as I can tell the address book only stores two items of information for each IM contact:  the messaging system (protocol) and the address (or username or whatever) entered by the user.  If you are using Akonadi::ContactViewer then these will be passed out on a click via the messagingClicked(proto,address) signal. If this information isn't enough to start a chat in KTp then obviously there needs to be some sort of lookup in your own address book system, which I guess is either on top of or in parallel with the Akonadi contacts.
>     
>     Does KTp have either a command line or a DBus interface? - in other words, will it be possible to just hand it a username and have it do the hard work of the lookup and connection?  If so, then it should be possible to do that from the address book actions - I'm envisaging that for each protocol there will be the option to configure either an internal connector (as KAddressBook currently has for Skype) or run an external command or script.  The latter could certainly do any initialisation or lookup required.
>     
>
> 
> Martin Klapetek wrote:
>     > If this information isn't enough to start a chat in KTp then obviously there needs to be some sort of lookup in your own address book system
>     
>     This part is the problematic part (and is problematic also for Gnome/Unity) - if Telepathy's account is offline, there is no address book system available. Telepathy will simply return an empty list. It's because of the design of Telepathy, which needs an active connection in order to list any contacts. I know there were some discussions about changing this behaviour, but I didn't follow the discussion that closely as it involved libfolks, which we're not using (and not gonna use) in KDE. I should actually look it up anyway.
>     
>     > Does KTp have either a command line or a DBus interface?
>     
>     There is a DBus interface directly to Telepathy; our library TelepathyQt is then mostly a wrapper around that interface. However the entry point is the Account object. So unless we know the exact path/uid of the account, we can't do much.
>     
>     
>     > in other words, will it be possible to just hand it a username and have it do the hard work of the lookup and connection?
>     
>     Given the above, it is possible to iterate over all connected accounts and try looking up the contact. The problem comes with networks which use non-human-readable contact ids, like Facebook or G+ and possibly others - for example Facebook uses ids like "-1010018451848484 at chat.facebook.com", G+ then has some hash or whatever. So lookup for these contacts would be impossible.
>     
>     
>     > If so, then it should be possible to do that from the address book actions - I'm envisaging that for each protocol there will be the option to configure either an internal connector (as KAddressBook currently has for Skype) or run an external command or script.  The latter could certainly do any initialisation or lookup required.
>     
>     Fwiw, I have a working solution with KDE-wide metacontacts, we hit some performance issues yesterday, but otherwise I think it's pretty neat. This is also our priority in KTp right now :) But of course, if you'd like to work on this from KTp side, we'll try to help.

Since tyou are working on improving IM contact support from the KTp end, I'll suspend this review request until it becomes clear whether any further kaddressbook changes will be needed.


- Jonathan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108837/#review26873
-----------------------------------------------------------


On Feb. 7, 2013, 5:58 p.m., Jonathan Marten wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/108837/
> -----------------------------------------------------------
> 
> (Updated Feb. 7, 2013, 5:58 p.m.)
> 
> 
> Review request for KDEPIM-Libraries.
> 
> 
> Description
> -------
> 
> Currently the address book only displays the "set as standard" IM address, even if the contact has more than one, and it is not clickable so nothing can be done with the displayed information
> 
> This change displays all of the configured IM addresses, identifying the protocol/application that applies - see screen shot.  Clicking on the address or icon will emit a new signal messagingClicked() from the contact viewer, similar to the existing ones (urlClicked() etc), identifying the protocol and address.  With this in place in kdepimlibs, a configuration and GUI could be implemented in the application to start an IM program, run a command or do whatever else is appropriate.
> 
> This addition is BC (adding a new non-virtual function).
> 
> 
> Diffs
> -----
> 
>   akonadi/contact/contactviewer.h 2ef8802 
>   akonadi/contact/contactviewer.cpp 06fda94 
>   akonadi/contact/standardcontactformatter.cpp 7e28346 
> 
> Diff: http://git.reviewboard.kde.org/r/108837/diff/
> 
> 
> Testing
> -------
> 
> Built kdepimlibs and kaddressbook with this change.  Checked display of multiple IM addresses and that the signal is emitted when one is clicked.
> 
> 
> File Attachments
> ----------------
> 
> IM addresses display
>   http://git.reviewboard.kde.org/media/uploaded/files/2013/02/07/kaddressbook-imdisplay.png
> 
> 
> Thanks,
> 
> Jonathan Marten
> 
>

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list