Merge branch 'presence'

This commit is contained in:
James Booth
2012-05-26 16:20:03 +01:00
11 changed files with 2003 additions and 42 deletions

View File

@@ -335,11 +335,15 @@ static int _jabber_presence_handler(xmpp_conn_t * const conn,
if (strcmp(short_jid, short_from) !=0) {
if (type == NULL) {// online
win_contact_online(short_from, show_str, status_str);
contact_list_add(short_from, show_str, status_str);
gboolean result = contact_list_add(short_from, show_str, status_str);
if (result) {
win_contact_online(short_from, show_str, status_str);
}
} else {// offline
win_contact_offline(short_from, show_str, status_str);
contact_list_remove(short_from);
gboolean result = contact_list_remove(short_from);
if (result) {
win_contact_offline(short_from, show_str, status_str);
}
}
win_page_off();