GNOME Bugzilla – Bug 678696
Add API for EDS Google system groups
Last modified: 2012-07-16 17:55:06 UTC
As needed for bug #676383.
Created attachment 217107 [details] [review] Add Edsf.Persona.in_google_personal_group https://www.gitorious.org/folks/folks/commits/676383-eds-google-personal-group Here’s a patch to expose the “My Contacts” system group from Google Contacts on EDS personas. For simplicity, I chose to implement it as a boolean property, rather than a set of the IDs of the system groups the contact’s in. If anyone thinks the latter idea is more future-proof, I’m happy to change the patch; but I think that all of the system groups except “My Contacts” are a waste of time anyway and don’t seem to be used for anything.
I should mention that this has a runtime dependency on EDS commit 1cfc48f58873ee448f2bb7853c9d3c0f0f48caab which will be in EDS 3.5.3.
Bah, and once more I’ve forgotten to update NEWS with the bug number. That should be done before this is committed.
Created attachment 217165 [details] avatar fetcher - WARNING: servers are going to hate you I hacked this simple app manually fetching avatars of all my TP contacts in order to populate my cache and test this patch. Unfortunatelly it doesn't seem to work: - Start Empathy and display offline contacts - Your offline Facebook contacts won't have an avatar - Run my script and freeze your laptop for a short while - All Facebook contacts now have an avatar - Restart Empathy - Their avatar is gone :(
Comment on attachment 217165 [details] avatar fetcher - WARNING: servers are going to hate you Sorry this was meant for bug #660128
How exactly do you test this? Are contacts from eds shown in empathy somehow? Only if they are linked to an im contact? Or are you just testing in folks-inspect?
(In reply to comment #6) > How exactly do you test this? Are contacts from eds shown in empathy somehow? > Only if they are linked to an im contact? Or are you just testing in > folks-inspect? With the patch from bug #676383, this should be testable in gnome-contacts itself — if it’s working, only the contacts from the “My Contacts” group should be listed. I just tested in folks-inspect, though.
I'm actually also interested in whether a contact is a google plus person from his circles. Is that possible to detect reliably?
(In reply to comment #8) > I'm actually also interested in whether a contact is a google plus person from > his circles. Is that possible to detect reliably? I’ve just checked the XML we get from Google’s API again, and there’s still absolutely nothing to differentiate Google+ contacts from contacts in your address book other than the presence of a link to their Google+ profile. I think it would make sense to move the hack for this into folks, though. Do you think it should be exposed as another boolean, or should I rework the patch to expose a set of well-known identifiers for things like “My Contacts” and Google+ profiles?
Thats kinda weird. Maybe you could file a bug against google for that?
(In reply to comment #10) > Thats kinda weird. Maybe you could file a bug against google for that? Filed: http://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=3154 I do not have high hopes for anyone from Google responding to this, let alone it being fixed. (In reply to comment #9) > I think it would make sense to move the hack for this into folks, though. Do > you think it should be exposed as another boolean, or should I rework the patch > to expose a set of well-known identifiers for things like “My Contacts” and > Google+ profiles? Thoughts about this?
I think this patch is ready to be merged. Then later on if google adds a way to differentiate the different contact types, we can add support for that later on.
Review of attachment 217107 [details] [review]: I think this patch is good for now, we can add support for google+ contacts after google adds a way to differentiate them (if they ever do).
Moving the hack to folks sounds good to me.
Review of attachment 217107 [details] [review]: commit 85e8d88f2dae0480d9804f6e60f9e6575cb9488a Author: Philip Withnall <philip@tecnocode.co.uk> Date: Sun Jun 24 11:50:06 2012 +0100 eds: Add an Edsf.Persona.in_google_personal_group property This is set whenever the persona is in the “My Contacts” group in Google Contacts, which is normally exposed by EDS as being in the “Personal” category. This system group can’t be reliably detected normally as “Personal” is translated by EDS. This caused problems for gnome-contacts, hence the new API. The new API requires EDS 3.5.3 at runtime, and will always be false otherwise. Helps: https://bugzilla.gnome.org/show_bug.cgi?id=676383 NEWS | 3 +- backends/eds/lib/edsf-persona.vala | 47 +++++++++++++++++++++++++++++++++++- 2 files changed, 48 insertions(+), 2 deletions(-)
Any chance you could update the patch in bug 676383? I'm on vacation and won't have time to do this myself.