[Telepathy-commits] [telepathy-haze/master] GetAliases: don't fail if there's no alias, just fall back to the identifier
Simon McVittie
simon.mcvittie at collabora.co.uk
Mon Mar 23 02:44:06 PDT 2009
---
src/connection-aliasing.c | 20 +++++++++-----------
1 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/src/connection-aliasing.c b/src/connection-aliasing.c
index dd6f3e0..cb3c818 100644
--- a/src/connection-aliasing.c
+++ b/src/connection-aliasing.c
@@ -92,25 +92,23 @@ haze_connection_request_aliases (TpSvcConnectionInterfaceAliasing *self,
alias = purple_connection_get_display_name (conn->account->gc);
if (!alias)
{
- DEBUG ("%s has no display_name, throwing NotAvailable", bname);
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
- "%u has no alias", handle);
- break;
+ DEBUG ("self (%s) has no display_name", bname);
+ alias = bname;
}
}
else
{
buddy = purple_find_buddy (conn->account, bname);
- if (!buddy)
+ if (buddy)
{
- DEBUG ("%s not on blist; throwing NotAvailable", bname);
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
- "Alias for %u unknown; subscribe to them first", handle);
- break;
+ alias = purple_buddy_get_alias (buddy);
+ }
+ else
+ {
+ DEBUG ("%s not on blist", bname);
+ alias = bname;
}
-
- alias = purple_buddy_get_alias (buddy);
}
DEBUG ("%s has alias \"%s\"", bname, alias);
--
1.5.6.5
More information about the telepathy-commits
mailing list