Added retrieval of caps string from presence

This commit is contained in:
James Booth
2013-01-19 23:52:50 +00:00
parent f3fcc892c3
commit 79c92656f9
9 changed files with 86 additions and 65 deletions

View File

@@ -347,11 +347,11 @@ prof_handle_leave_room(const char * const room)
void
prof_handle_contact_online(char *contact, char *show, char *status,
GDateTime *last_activity)
GDateTime *last_activity, char *caps_str)
{
gboolean updated = contact_list_update_contact(contact, show, status, last_activity);
gboolean presence_changed = contact_list_update_contact(contact, show, status, last_activity, caps_str);
if (updated) {
if (presence_changed) {
PContact result = contact_list_get_contact(contact);
if (p_contact_subscription(result) != NULL) {
if (strcmp(p_contact_subscription(result), "none") != 0) {
@@ -365,9 +365,9 @@ prof_handle_contact_online(char *contact, char *show, char *status,
void
prof_handle_contact_offline(char *contact, char *show, char *status)
{
gboolean updated = contact_list_update_contact(contact, "offline", status, NULL);
gboolean presence_changed = contact_list_update_contact(contact, "offline", status, NULL, NULL);
if (updated) {
if (presence_changed) {
PContact result = contact_list_get_contact(contact);
if (p_contact_subscription(result) != NULL) {
if (strcmp(p_contact_subscription(result), "none") != 0) {