diff options
author | James Booth <boothj5@gmail.com> | 2014-09-30 00:16:01 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-09-30 00:16:01 +0100 |
commit | 4f7feedb655bc575c6041ef8b19a48342ce346b1 (patch) | |
tree | 8bcdaa9e102bbdcd01ec1421b1d4fe480da19f43 /src/xmpp | |
parent | 2dacfc823a79d69a6bafaee0388732ad6878e2a7 (diff) | |
download | profani-tty-4f7feedb655bc575c6041ef8b19a48342ce346b1.tar.gz |
Changed rooms to use Occupant type instead of PContact
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/iq.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index 34722ee2..10355332 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -493,16 +493,17 @@ _version_result_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, os_str = xmpp_stanza_get_text(os); } - PContact contact; Jid *jidp = jid_create(jid); + const char *presence = NULL; if (muc_active(jidp->barejid)) { - contact = muc_roster_item(jidp->barejid, jidp->resourcepart); + Occupant *occupant = muc_roster_item(jidp->barejid, jidp->resourcepart); + presence = string_from_resource_presence(occupant->presence); } else { - contact = roster_get_contact(jidp->barejid); + PContact contact = roster_get_contact(jidp->barejid); + Resource *resource = p_contact_get_resource(contact, jidp->resourcepart); + presence = string_from_resource_presence(resource->presence); } - Resource *resource = p_contact_get_resource(contact, jidp->resourcepart); - const char *presence = string_from_resource_presence(resource->presence); handle_software_version_result(jid, presence, name_str, version_str, os_str); jid_destroy(jidp); |