diff --git a/src/ejabberd_s2s_in.erl b/src/ejabberd_s2s_in.erl index 590b322f8..5ba3ecb49 100644 --- a/src/ejabberd_s2s_in.erl +++ b/src/ejabberd_s2s_in.erl @@ -399,7 +399,7 @@ stream_established({xmlstreamelement, El}, StateData) -> (Name == 'presence')) -> ejabberd_hooks:run( s2s_receive_packet, - exmpp_jid:prep_domain(From), + exmpp_jid:prep_domain(To), [From, To, El]), ejabberd_router:route( From, To, El); @@ -419,7 +419,7 @@ stream_established({xmlstreamelement, El}, StateData) -> (Name == 'presence')) -> ejabberd_hooks:run( s2s_receive_packet, - exmpp_jid:prep_domain(From), + exmpp_jid:prep_domain(To), [From, To, El]), ejabberd_router:route( From, To, El);