[folks] Bug 629643 — do not fall back to the id if alias is empty
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Bug 629643 — do not fall back to the id if alias is empty
- Date: Tue, 21 Sep 2010 10:35:52 +0000 (UTC)
commit 1f831577bef5ad7cd0579cf55ea93e2879193746
Author: Philip Withnall <philip withnall collabora co uk>
Date: Tue Sep 21 11:33:40 2010 +0100
Bug 629643 â?? do not fall back to the id if alias is empty
Only use the display ID as a fallback in Individual: in Tpf.Persona, we
should let empty aliases be exposed, so that the client can (if they so
desire) check whether an Individual's alias is a display ID or a real alias.
Closes: bgo#629643
NEWS | 1 +
backends/telepathy/lib/tpf-persona.vala | 11 ++---------
2 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/NEWS b/NEWS
index 8cf3e91..a931cbe 100644
--- a/NEWS
+++ b/NEWS
@@ -37,6 +37,7 @@ Bugs fixed:
* Bug 629096 â?? Add a library init function
* Bug 627402 â?? Support marking FolksPersonas as "me"
* Bug 629642 â?? individuals-changed emitted in the wrong order
+* Bug 629643 â?? do not fall back to the id if alias is empty
Overview of changes from libfolks 0.1.16 to libfolks 0.1.17
===========================================================
diff --git a/backends/telepathy/lib/tpf-persona.vala b/backends/telepathy/lib/tpf-persona.vala
index a8eba61..8e9fa03 100644
--- a/backends/telepathy/lib/tpf-persona.vala
+++ b/backends/telepathy/lib/tpf-persona.vala
@@ -217,16 +217,9 @@ public class Tpf.Persona : Folks.Persona,
var account = account_for_connection (connection);
string uid = this.build_uid ("telepathy", account.get_protocol (), id);
- var alias = contact.get_alias ();
- var display_id = id;
-
- /* If the alias is empty, fall back to the display ID */
- if (alias == null || alias.strip () == "")
- alias = display_id;
-
- Object (alias: alias,
+ Object (alias: contact.get_alias (),
contact: contact,
- display_id: display_id,
+ display_id: id,
/* FIXME: This IID format should be moved out to the IMable
* interface along with the code in
* Kf.Persona.linkable_property_to_links(), but that depends on
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]