Coloured contact and subscription in /roster and /group output

This commit is contained in:
James Booth
2013-07-03 23:44:51 +01:00
parent 817857e4c0
commit 581c1e8b95
6 changed files with 103 additions and 63 deletions

View File

@@ -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)
{