Commit fc5d0617 authored by Raul Gutierrez Segales's avatar Raul Gutierrez Segales
Browse files

e-d-s: set content type on ContactPhotos

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=662616
parent aa50fcfa
......@@ -6,6 +6,7 @@ Bugs fixed:
parameters.
* Bug 660908 — Add favourites support to EDS backend
* Bug 662770 — ContactPhotos are ignored when mime type is null
* Bug 662616 — We should set mime type when setting an EContact's photo
API changes:
* Add AbstractFieldDetails.id to identify instances of details
......
......@@ -1295,6 +1295,15 @@ public class Edsf.PersonaStore : Folks.PersonaStore
}
cp.set_inlined (image_data);
bool uncertain = false;
var mime_type = ContentType.guess (null, image_data,
out uncertain);
if (mime_type != null && !uncertain)
{
cp.set_mime_type (mime_type);
}
contact.set (ContactField.PHOTO, cp);
}
catch (GLib.Error e1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment