diff src/blist.c @ 7312:b8ce6e194cff

[gaim-migrate @ 7896] Kevin Stange mentioned that we weren't using contact aliases right when sorting, so I fixinated it. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Wed, 22 Oct 2003 02:01:30 +0000
parents 1930e3d00ecd
children 53c86d59f20b
line wrap: on
line diff
--- a/src/blist.c	Tue Oct 21 17:41:57 2003 +0000
+++ b/src/blist.c	Wed Oct 22 02:01:30 2003 +0000
@@ -106,7 +106,7 @@
 	}
 }
 
-static GaimContact *gaim_buddy_get_contact(GaimBuddy *buddy)
+GaimContact *gaim_buddy_get_contact(GaimBuddy *buddy)
 {
 	return (GaimContact*)((GaimBlistNode*)buddy)->parent;
 }
@@ -775,7 +775,13 @@
 
 const char *gaim_contact_get_alias(GaimContact* contact)
 {
-	return contact ? contact->alias : NULL;
+	if(!contact)
+		return NULL;
+
+	if(contact->alias)
+		return contact->alias;
+
+	return gaim_get_buddy_alias(contact->priority);
 }
 
 GaimGroup *gaim_group_new(const char *name)