[Telepathy-commits] [telepathy-gabble/master] Set a handle's alias in the roster so that vCards aren't fetched on every connect.

Jonny Lamb jonny.lamb at collabora.co.uk
Mon Sep 29 05:56:25 PDT 2008


Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
---
 src/conn-aliasing.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/conn-aliasing.c b/src/conn-aliasing.c
index b00e732..6cc439a 100644
--- a/src/conn-aliasing.c
+++ b/src/conn-aliasing.c
@@ -760,6 +760,12 @@ gabble_conn_aliasing_nickname_updated (GObject *object,
   g_value_unset (&entry);
   g_ptr_array_free (aliases, TRUE);
 
+  /* Check whether the roster has an entry for the handle and if so, set the
+   * roster alias so the vCard isn't fetched on every connect. */
+  if (signal_source < GABBLE_CONNECTION_ALIAS_FROM_ROSTER &&
+      gabble_roster_handle_has_entry (conn->roster, handle))
+    gabble_roster_handle_set_name (conn->roster, handle, alias, NULL);
+
 OUT:
   g_free (alias);
 }
-- 
1.5.6.5




More information about the Telepathy-commits mailing list