mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-27 22:16:21 +00:00
Added result to add and remove from autocomplete
This commit is contained in:
12
jabber.c
12
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();
|
||||
|
||||
Reference in New Issue
Block a user