diff options
author | James Booth <boothj5@gmail.com> | 2013-07-03 23:44:51 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2013-07-03 23:44:51 +0100 |
commit | 581c1e8b951d7b9841cec56d5ebf9d3c138e6ce9 (patch) | |
tree | 45645cc4fa432bc48be631aa6782469abadc4269 /src/contact.c | |
parent | 817857e4c0d986226b7c213debca9de4f32e979a (diff) | |
download | profani-tty-581c1e8b951d7b9841cec56d5ebf9d3c138e6ce9.tar.gz |
Coloured contact and subscription in /roster and /group output
Diffstat (limited to 'src/contact.c')
-rw-r--r-- | src/contact.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/contact.c b/src/contact.c index bab3d89c..44cbd4b4 100644 --- a/src/contact.c +++ b/src/contact.c @@ -252,6 +252,20 @@ p_contact_subscription(const PContact contact) return contact->subscription; } +gboolean +p_contact_subscribed(const PContact contact) +{ + if (contact->subscription == NULL) { + return FALSE; + } else if (strcmp(contact->subscription, "to") == 0) { + return TRUE; + } else if (strcmp(contact->subscription, "both") == 0) { + return TRUE; + } else { + return FALSE; + } +} + Resource * p_contact_get_resource(const PContact contact, const char * const resource) { |