Show only nick or jid in /wins output

This commit is contained in:
James Booth
2013-08-31 15:07:05 +01:00
parent 4ae817cd82
commit 694e332384
3 changed files with 17 additions and 9 deletions

View File

@@ -156,6 +156,16 @@ p_contact_name(const PContact contact)
return contact->name;
}
const char *
p_contact_name_or_jid(const PContact contact)
{
if (contact->name != NULL) {
return contact->name;
} else {
return contact->barejid;
}
}
static Resource *
_highest_presence(Resource *first, Resource *second)
{