diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2010-07-13 07:30:46 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2010-07-13 07:30:46 +0200 |
commit | 4716cfc2cbf012a070fec8db4856c1761f8a50ee (patch) | |
tree | 5f774e7968a919e153aca3f3046371bbb78deb5c /src/core/ephraim_conn.erl | |
parent | 99df39229cc6a0c5e447705ddc577e180b82c04c (diff) | |
download | ephraim-4716cfc2cbf012a070fec8db4856c1761f8a50ee.tar ephraim-4716cfc2cbf012a070fec8db4856c1761f8a50ee.zip |
Added VCard support to roster
Diffstat (limited to 'src/core/ephraim_conn.erl')
-rw-r--r-- | src/core/ephraim_conn.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/ephraim_conn.erl b/src/core/ephraim_conn.erl index 7a6ddae..65bbacc 100644 --- a/src/core/ephraim_conn.erl +++ b/src/core/ephraim_conn.erl @@ -1,6 +1,7 @@ -module(ephraim_conn). -compile([debug_info, export_all]). -include_lib("exmpp/include/exmpp_client.hrl"). +-include_lib("exmpp/include/exmpp_xml.hrl"). -record(conn_state, { session :: any() @@ -21,6 +22,8 @@ init() -> session(State) -> io:format("Logging in...~n"), exmpp_session:login(State#conn_state.session), + io:format("Getting profile...~n"), + exmpp_session:send_packet(State#conn_state.session, exmpp_iq:get('jabber:client', #xmlel{ns='vcard-temp',name='vCard'})), io:format("Getting roster...~n"), exmpp_session:send_packet(State#conn_state.session, exmpp_client_roster:get_roster("foo")), io:format("Setting presence...~n"), @@ -49,8 +52,9 @@ loop(State) -> loop(State); #received_packet{packet_type=iq, raw_packet=Packet} -> + From = exmpp_stanza:get_sender(Packet), IQ = exmpp_iq:xmlel_to_iq(Packet), - ephraim ! {receive_iq, IQ}, + ephraim ! {receive_iq, From, IQ}, loop(State); {send_packet, Packet} -> |