mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-29 18:36:22 +00:00
Presence notifications sent to chat windows
This commit is contained in:
4
jabber.c
4
jabber.c
@@ -288,7 +288,7 @@ static int _jabber_presence_handler(xmpp_conn_t * const conn,
|
||||
xmpp_stanza_t * const stanza, void * const userdata)
|
||||
{
|
||||
char *from = xmpp_stanza_get_attribute(stanza, "from");
|
||||
char *short_from = strtok(from, "@");
|
||||
char *short_from = strtok(from, "/");
|
||||
char *type = xmpp_stanza_get_attribute(stanza, "type");
|
||||
|
||||
char *show_str, *status_str;
|
||||
@@ -307,8 +307,10 @@ static int _jabber_presence_handler(xmpp_conn_t * const conn,
|
||||
|
||||
if (type == NULL) { // online
|
||||
cons_show_contact_online(short_from, show_str, status_str);
|
||||
win_show_contact_online(short_from, show_str, status_str);
|
||||
} else { // offline
|
||||
cons_show_contact_offline(short_from, show_str, status_str);
|
||||
win_show_contact_offline(short_from, show_str, status_str);
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user