diff --git a/mod_statsdx/src/mod_statsdx.erl b/mod_statsdx/src/mod_statsdx.erl index 1ca577c..3f8170c 100644 --- a/mod_statsdx/src/mod_statsdx.erl +++ b/mod_statsdx/src/mod_statsdx.erl @@ -243,7 +243,7 @@ user_send_packet({NewEl, C2SState}) -> %% Only required for traffic stats user_send_packet_traffic({NewEl, _C2SState} = Acc) -> From = xmpp:get_from(NewEl), - To = xmpp:get_from(NewEl), + To = xmpp:get_to(NewEl), Host = From#jid.lserver, HostTo = To#jid.lserver, Type2 = case NewEl of @@ -262,7 +262,7 @@ user_send_packet_traffic({NewEl, _C2SState} = Acc) -> %% Only required for traffic stats user_receive_packet_traffic({NewEl, _C2SState} = Acc) -> From = xmpp:get_from(NewEl), - To = xmpp:get_from(NewEl), + To = xmpp:get_to(NewEl), HostFrom = From#jid.lserver, Host = To#jid.lserver, Type2 = case NewEl of