From a5166f394620763e35afa3736ba02c80e8cc64bd Mon Sep 17 00:00:00 2001 From: Evgeniy Khramtsov Date: Fri, 15 Oct 2010 23:13:29 +1000 Subject: [PATCH] copied feature_inspect_packet hook from iphone svn repo --- src/ejabberd_c2s.erl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ejabberd_c2s.erl b/src/ejabberd_c2s.erl index 2b0ef2237..e8c37b740 100644 --- a/src/ejabberd_c2s.erl +++ b/src/ejabberd_c2s.erl @@ -1678,9 +1678,19 @@ send_text(StateData, Text) -> (StateData#state.sockmod):send(StateData#state.socket, Text). send_element(StateData, El) when StateData#state.xml_socket -> + ejabberd_hooks:run(feature_inspect_packet, + StateData#state.server, + [StateData#state.jid, + StateData#state.server, + StateData#state.pres_last, El]), (StateData#state.sockmod):send_xml(StateData#state.socket, {xmlstreamelement, El}); send_element(StateData, El) -> + ejabberd_hooks:run(feature_inspect_packet, + StateData#state.server, + [StateData#state.jid, + StateData#state.server, + StateData#state.pres_last, El]), send_text(StateData, xml:element_to_binary(El)). send_header(StateData, Server, Version, Lang)