GNOME Bugzilla – Bug 792653
Use GetUserPhoto for GAL contacts
Last modified: 2018-05-30 11:33:19 UTC
See https://bugzilla.gnome.org/show_bug.cgi?id=792411 for more info. How should we handle searching for contact photos? My vote: only bring up photo once the particular contact clicked. Don't fetch each picture just minimal contact info then when clicking pull in full contact info.
Thanks for a bug report. The "contact clicked" is a no-op in the evolution(-data-server) world. The contacts are downloaded to the local cache and then provided to any client (not only evolution) as needed (as the clients ask for them when using some filtering on the book). The closest to what you suggests is an Online GAL, where contacts are returned only when searching for them. The code can use GetUserPhoto() for the returned contacts, or to some subset of them, like up to the first 10, but that can slow the response of the book significantly. The code can schedule the photo download and update the contacts if/when they have any photo, thus, maybe, it's doable at least this way.
This is Exchange 2013+ material and even it is turned on by default (in GAL book Properties, option "Fetch contact photos"), I'm still afraid of rejects on the server side, thus it's possible the default will be changed in the future. As it currently works, the offline GAL tries to get photo for each new/modified contact, unless the server rejects the GetUserPhoto request with ServerBusy error, in which case the tries are stopped. It is also tried to fetch the photo when searching for a contact, it doesn't matter whether in online or offline GAL, but only up to ten times, also until ServerBusy and only once per day for each contact. It's because there is no indication whether the contact has a picture or not. While offline GAL can drop the photo, the online GAL cannot, because any already downloaded photo is copied into the newly resolved contact, thus it's carried over ad infinity/until the local cache is deleted manually, regardless the existence of the photo on the server. Similarly, when the photo changes on the server the online GAL will not notice it, it'll still use the old photo. This is important, because I really do not want to piss off the Exchange server, the less office365.com server. Created commit 11cf0fa in ews master (3.29.2+)
Nice! Any chance we can have this in 3.28 too?
No, it adds new UI and new translatable strings, which is a no-go for the stable branches.
Just upgraded to 3.29.2(built it using the same "ebuild" as for 3.28.2) and wanted to see contact photos for my GAL(offline) in o365 but I cannot find any, nor a a config knob to toggle. I must be missing something?
When you restart evolution, and all background processes of evolution-data-server, which can be done with `evolution --force-shutdown`, then in the context-menu of the GAL, pick Properties, and there's the option. Change it, confirm the change, then right-click again and use Refresh and/or search for some contact which should have the photo. It will be updated with it when returned from the server.
Right, I actually screwed up. I installed 3.29.3 on another machine than I ran my evo on :( Fixing that, I now have the option for photos. However, when opening my offline GAL I get the error msg: The reported error was “Failed to update GAL:404 Not Found”. and no photos. Debug settings for that?
After a few restarts and a reboot it started to work. Now I see photos in GAL contacts list, thanks :)
(In reply to Joakim Tjernlund from comment #7) > However, when opening my offline GAL I get the error msg: > The reported error was “Failed to update GAL:404 Not Found”. Hrm, it should not do that. (In reply to Joakim Tjernlund from comment #8) > After a few restarts and a reboot it started to work. It looks like more background processes required restart. Good you made it working.