mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Check for resource in unavailable presence handler
This commit is contained in:
parent
9f8a7f52a5
commit
236895ec96
@ -342,9 +342,13 @@ _unavailable_handler(xmpp_conn_t * const conn,
|
|||||||
status_str = NULL;
|
status_str = NULL;
|
||||||
|
|
||||||
if (strcmp(my_jid->barejid, from_jid->barejid) !=0) {
|
if (strcmp(my_jid->barejid, from_jid->barejid) !=0) {
|
||||||
prof_handle_contact_offline(from_jid->barejid, from_jid->resourcepart, status_str);
|
if (from_jid->resourcepart != NULL) {
|
||||||
|
prof_handle_contact_offline(from_jid->barejid, from_jid->resourcepart, status_str);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
connection_remove_available_resource(from_jid->resourcepart);
|
if (from_jid->resourcepart != NULL) {
|
||||||
|
connection_remove_available_resource(from_jid->resourcepart);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
jid_destroy(my_jid);
|
jid_destroy(my_jid);
|
||||||
|
Loading…
Reference in New Issue
Block a user