GNOME Bugzilla – Bug 723187
there is no way to detect automatic created im fields
Last modified: 2014-01-31 15:43:00 UTC
EDS backend creates automatic Im fields based on contact e-mail address to make it possible to link with telepathy contacts. But there is no way to detect if the field is a real data or just a virtual field.
Created attachment 267439 [details] [review] A patch to add a extra attribute in the im field
Review of attachment 267439 [details] [review]: Looks good to me. A few cosmetic changes are necessary though. :-) ::: backends/eds/lib/edsf-persona.vala @@ +121,3 @@ + * on the field. + * + */ I think the comment can be simplified a bit to: /** * Name of folks’ custom parameter indicating automatic fields * * Folks can create extra fields to improve linking between personas. * These fields have a boolean-typed parameter added with this name, * and the value ‘TRUE’. This allows clients to detect such fields * and (for example) ignore them in the UI. * * Since: UNRELEASED */ @@ +1736,3 @@ var im_fd = new ImFieldDetails (normalised_addr); + im_fd.add_parameter ( + Edsf.Persona.folks_field_attribute_name, "TRUE"); You might want to amend the big comment (which mentions bug #657142) just above this section to say that clients can use the X-FOLKS-FIELD property to detect IM addresses which may not be used.
Created attachment 267732 [details] [review] A patch to add a extra attribute in the im field
Review of attachment 267732 [details] [review]: ::: backends/eds/lib/edsf-persona.vala @@ +1739,3 @@ + to flag it adding a new parameter X-FOLKS-FIELD, this will + allow the top-level API to detect it and choose if use it + or not. See bug #657142 */ No, I meant you should *amend* the big comment here: https://git.gnome.org/browse/folks/tree/backends/eds/lib/edsf-persona.vala#n1685 not add a new one! :-)
Created attachment 267738 [details] [review] eds: Add a extra parameter on IM fields created based on e-mail address
I pushed the patch with the above issue fixed. Thanks! Attachment 267738 [details] pushed as 8d17efe - eds: Add a extra parameter on IM fields created based on e-mail address