diff options
author | James Booth <boothj5@gmail.com> | 2013-08-31 15:07:05 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2013-08-31 15:07:05 +0100 |
commit | 694e332384a9dc0794c778ce6d6400ae5fa35c20 (patch) | |
tree | dbc07c41c208c08bbb73503adff6a0bc401bbab4 /src/contact.c | |
parent | 4ae817cd8292f964ef1c45bfa3b70544ce23043f (diff) | |
download | profani-tty-694e332384a9dc0794c778ce6d6400ae5fa35c20.tar.gz |
Show only nick or jid in /wins output
Diffstat (limited to 'src/contact.c')
-rw-r--r-- | src/contact.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/contact.c b/src/contact.c index 1b566d40..9cc992b2 100644 --- a/src/contact.c +++ b/src/contact.c @@ -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) { |