GNOME Bugzilla – Bug 671714
Fail to add contact to the contact list
Last modified: 2012-03-26 14:06:08 UTC
I'm trying to add a contact using Empathy's 'Add contact' dialog. It calls folks_individual_aggregator_add_persona_from_details() but Folks never do the Telepathy D-Bus calls to actually add the contact. As you can see in the Folks claim that the persona already exists (which may be true as the dialog displays some info about the contact before actually adding it, so the contact already exists in TP (he has a handle)), set is-in-contact-list to true but doesn't request to actually add it to the contact list. tp-glib/contacts-DEBUG: contacts_aliases_changed: Contact "debarshi.ray@talkr.im" alias changed from "debarshi.ray@talkr.im" to "debarshi.ray@talkr.im" empathy-DEBUG: empathy_contact_set_alias: Setting alias for contact debarshi.ray@talkr.im to debarshi.ray@talkr.im empathy-DEBUG: empathy_contact_set_alias: Setting alias for contact debarshi.ray@talkr.im to debarshi.ray@talkr.im empathy-DEBUG: empathy_individual_manager_add_from_contact: adding individual from contact debarshi.ray@talkr.im (debarshi.ray@talkr.im) tp-glib/handles-DEBUG: connection_requested_handles: 1 handles of type 1 tp-glib/handles-DEBUG: tp_connection_get_contact_attributes: 1 handles tp-glib/handles-DEBUG: tp_connection_get_contact_attributes: - 127 telepathy-DEBUG: tpf-persona-store.vala:1970: Creating persona from contact 'debarshi.ray@talkr.im' telepathy-DEBUG: tpf-persona-store.vala:2048: Adding persona from contact 'debarshi.ray@talkr.im' (127) telepathy-DEBUG: tpf-persona-store.vala:2078: ...already exists. telepathy-DEBUG: tpf-persona-store.vala:2088: Setting is-in-contact-list to true empathy-DEBUG: contact_finalize: finalize: 0x34470e0 telepathy-DEBUG: tpf-persona-store.vala:1551: Ignoring handle 127 (persona: 0x32ad000) folks-DEBUG: individual-aggregator.vala:1241: Removing Personas: folks-DEBUG: individual-aggregator.vala:1245: telepathy:/org/freedesktop/Telepathy/Account/gabble/jabber/guillaume_2edesmottes_40collabora_2eco_2euk0:debarshi.ray@talkr.im (is user: no, IID: jabber:debarshi.ray@talkr.im) folks-DEBUG: individual-aggregator.vala:1269: Removing Individuals due to removed links: folks-DEBUG: individual-aggregator.vala:1298: Adding Personas: folks-DEBUG: individual-aggregator.vala:1314: Relinking Personas: folks-DEBUG: individual-aggregator.vala:1390: Replacing Individuals due to linking: telepathy-DEBUG: tpf-persona.vala:1000: Destroying Tpf.Persona 'telepathy:/org/freedesktop/Telepathy/Account/gabble/jabber/guillaume_2edesmottes_40collabora_2eco_2euk0:debarshi.ray@talkr.im': 0x32ad000
(In reply to comment #0) > As you can see in the Folks claim that the persona already exists (which may be > true as the dialog displays some info about the contact before actually adding > it, so the contact already exists in TP (he has a handle)), set > is-in-contact-list to true but doesn't request to actually add it to the > contact list. Am I mising something here? Is Folks supposed to be do the request later or...?
*** Bug 672586 has been marked as a duplicate of this bug. ***
Created attachment 210346 [details] [review] _add_persona_from_contact: always return the persona In some case we may be interested by using the persona even if it was already existing.
Created attachment 210347 [details] [review] create_personas_from_contact_ids: always return all the personas We always want to try adding the persona to Telepathy, even if it was already existing in Folks because, for example, we look for the details of this contact before adding it.
Review of attachment 210346 [details] [review]: Looks fine to me, but it might make sense to rename “_add_persona_from_contact” to “_ensure_persona_from_contact” now that its behaviour has changed. Please commit once you’ve made that change.
Review of attachment 210347 [details] [review]: Also looks fine, but again it might make sense to rename “_create_personas_from_contact_ids” to “_ensure_personas_from_contact_ids”. Once you’ve done that, *and added an entry to NEWS* in the commit, please push to master. Thanks!
(In reply to comment #5) > Review of attachment 210346 [details] [review]: > > Looks fine to me, but it might make sense to rename “_add_persona_from_contact” > to “_ensure_persona_from_contact” now that its behaviour has changed. Please > commit once you’ve made that change. We already have internal Tpf.Persona? _ensure_persona_from_contact (Contact contact)
Created attachment 210400 [details] [review] create_personas_from_contact_ids: always return all the personas We always want to try adding the persona to Telepathy, even if it was already existing in Folks because, for example, we look for the details of this contact before adding it.
Review of attachment 210400 [details] [review]: Great!
Attachment 210346 [details] pushed as 8f26cd5 - _add_persona_from_contact: always return the persona Attachment 210400 [details] pushed as 7df672d - create_personas_from_contact_ids: always return all the personas