Bug 186296 - Kopete DBus bad behaviour with linked addressbook contacts
Summary: Kopete DBus bad behaviour with linked addressbook contacts
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Applications
Component: DBus (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
: 167441 208737 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-03-06 02:03 UTC by Lukas
Modified: 2012-06-08 14:23 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas 2009-03-06 02:03:56 UTC
Version:           0.70.0 (using KDE 4.2.0)
OS:                Linux
Installed from:    SuSE RPMs

I have a Jabber-contact in Kopete that is linked to a specific contact in my Kontact-addressbook; now when I query kopete over dbus, I get an ID like this:

gG2oDHcPwx

Calling the DBus /Kopete contactProperties on this ID returns an empty string. When I unlink that entry from the addressbook, the ID looks like this:

JabberProtocol:someone@server.com:someone@otherserver.com

And I can query it correctly with DBus.
Comment 1 Rettich 2009-04-03 16:58:17 UTC
Kopete DBus has much improved since KDE 4.0 but your are right. This is still a bug.

I had a look through the source and found something interesting:

The dbus methode conacts() returns a list of !!meta!! contacts. So gG2oDHcPwx is the meta contanct id.
The dbus methode contactProperties() calls KopeteDBusInterfacePrivate::findContact() and this methode calls Kopete::ContactList::self()->findMetaContactByContactId(). This means: conactProperties() wants a contact id and not a !!meta!! contact id.

I think changing the line:
contact = Kopete::ContactList::self()->findMetaContactByContactId(
                nameOrId);
to:
contact = Kopete::ContactList::self()->metaContact(
                nameOrId);
in:
kopete/kopetedbusinterface_p.cpp will solve the problem.
Btw: The same problem exists in sendMessage(), getDisplayName(), etc. I think this change will solve those problems, too.
Comment 2 Rettich 2009-04-03 17:02:11 UTC
*** Bug 167441 has been marked as a duplicate of this bug. ***
Comment 3 Rettich 2009-05-27 12:48:10 UTC
I've tryed KDE4.3 and this seems fixed now.
Comment 4 Jeroen van Meeuwen (Kolab Systems) 2012-06-08 14:22:27 UTC
Marking as such
Comment 5 Jeroen van Meeuwen (Kolab Systems) 2012-06-08 14:23:03 UTC
*** Bug 208737 has been marked as a duplicate of this bug. ***