diff options
author | James Booth <boothj5@gmail.com> | 2012-05-26 16:20:03 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2012-05-26 16:20:03 +0100 |
commit | 9f5cff096c8021914ab8ba443c924824cadcced9 (patch) | |
tree | f5a817d3cfa0bb6c700c660626a1a25bd9c28d6a /jabber.c | |
parent | 278cd9dd1d2b7ceea766cbe2f1bed050954540a5 (diff) | |
parent | 2429d23fbb57ed42245d4ba1785a9cff87ea0e8b (diff) | |
download | profani-tty-9f5cff096c8021914ab8ba443c924824cadcced9.tar.gz |
Merge branch 'presence'
Diffstat (limited to 'jabber.c')
-rw-r--r-- | jabber.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/jabber.c b/jabber.c index 9e61b1f5..88b69323 100644 --- a/jabber.c +++ b/jabber.c @@ -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(); |