[folks] Add back TpContact features



commit 889ac810497d74fc43e1530de06af50956c69cdd
Author: Xavier Claessens <xavier claessens collabora co uk>
Date:   Tue Apr 10 17:28:21 2012 +0200

    Add back TpContact features
    
    This is for backward compatibility
    
    https://bugzilla.gnome.org/show_bug.cgi?id=630822

 backends/telepathy/lib/tpf-persona-store.vala |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/backends/telepathy/lib/tpf-persona-store.vala b/backends/telepathy/lib/tpf-persona-store.vala
index 5f4f73d..bb4002b 100644
--- a/backends/telepathy/lib/tpf-persona-store.vala
+++ b/backends/telepathy/lib/tpf-persona-store.vala
@@ -440,6 +440,24 @@ public class Tpf.PersonaStore : Folks.PersonaStore
 
               this._account_manager = AccountManager.dup ();
 
+              /* FIXME: Add all contact features on AM's factory. We should not
+               * force preparing all features but let app define what it needs,
+               * but this is for backward compatibility.
+               * Note that if application already prepared TpContacts before
+               * preparing this store, this will have no effect on existing
+               * contacts. */
+              var factory = this._account_manager.get_factory ();
+              factory.add_contact_features ({
+                  ContactFeature.ALIAS,
+                  ContactFeature.AVATAR_DATA,
+                  ContactFeature.AVATAR_TOKEN,
+                  ContactFeature.CAPABILITIES,
+                  ContactFeature.CLIENT_TYPES,
+                  ContactFeature.PRESENCE,
+                  ContactFeature.CONTACT_INFO,
+                  ContactFeature.CONTACT_GROUPS
+              });
+
               this._account_manager.invalidated.connect (
                   this._account_manager_invalidated_cb);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]