mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Refactored contact display string
This commit is contained in:
parent
d15751649c
commit
9da4a6e1b9
@ -171,12 +171,9 @@ p_contact_create_display_string(const PContact contact, const char * const resou
|
||||
{
|
||||
GString *result_str = g_string_new("");
|
||||
|
||||
// use nickname if exists
|
||||
if (contact->name != NULL) {
|
||||
g_string_append(result_str, contact->name);
|
||||
} else {
|
||||
g_string_append(result_str, contact->barejid);
|
||||
}
|
||||
// use nickname if exists
|
||||
const char *display_name = p_contact_name_or_jid(contact);
|
||||
g_string_append(result_str, display_name);
|
||||
|
||||
// add resource if not default provided by profanity
|
||||
if (strcmp(resource, "__prof_default") != 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user