mirror of
https://github.com/profanity-im/profanity.git
synced 2025-02-02 15:08:15 -05:00
Use original JID in software version request in MUC
This commit is contained in:
parent
ac3e7dd9e8
commit
0b7c79ac13
@ -886,18 +886,17 @@ _version_result_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
|
|||||||
os_str = xmpp_stanza_get_text(os);
|
os_str = xmpp_stanza_get_text(os);
|
||||||
}
|
}
|
||||||
|
|
||||||
Jid *jidp = jid_create(jid);
|
if (g_strcmp0(jid, (char*)userdata) != 0) {
|
||||||
|
log_warning("From attribute specified different JID, using original JID.");
|
||||||
|
}
|
||||||
|
|
||||||
|
Jid *jidp = jid_create((char*)userdata);
|
||||||
const char *presence = NULL;
|
const char *presence = NULL;
|
||||||
if (muc_active(jidp->barejid)) {
|
if (muc_active(jidp->barejid)) {
|
||||||
Occupant *occupant = muc_roster_item(jidp->barejid, jidp->resourcepart);
|
Occupant *occupant = muc_roster_item(jidp->barejid, jidp->resourcepart);
|
||||||
presence = string_from_resource_presence(occupant->presence);
|
presence = string_from_resource_presence(occupant->presence);
|
||||||
} else {
|
} else {
|
||||||
PContact contact = roster_get_contact(jidp->barejid);
|
PContact contact = roster_get_contact(jidp->barejid);
|
||||||
if (!contact) {
|
|
||||||
jid_destroy(jidp);
|
|
||||||
jidp = jid_create((char*)userdata);
|
|
||||||
contact = roster_get_contact(jidp->barejid);
|
|
||||||
}
|
|
||||||
Resource *resource = p_contact_get_resource(contact, jidp->resourcepart);
|
Resource *resource = p_contact_get_resource(contact, jidp->resourcepart);
|
||||||
presence = string_from_resource_presence(resource->presence);
|
presence = string_from_resource_presence(resource->presence);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user