]> granicus.if.org Git - ejabberd/commitdiff
Get rid of substitute_forwarded
authorPaweł Chmielowski <pchmielowski@process-one.net>
Fri, 18 Nov 2016 10:51:57 +0000 (11:51 +0100)
committerPaweł Chmielowski <pchmielowski@process-one.net>
Fri, 18 Nov 2016 10:51:57 +0000 (11:51 +0100)
test/suite.erl
test/suite.hrl

index 49ebaa89134f8c07f2b6723db803661c436f6a4e..a288a5f663a565492fdf1c661635d0100f1be251 100644 (file)
@@ -481,22 +481,9 @@ format_element(El) ->
        false -> io_lib:format(" ~s~n", El)
     end.
 
-substitute_forwarded(#mam_result{sub_els = Sub} = El) ->
-    El#mam_result{sub_els = [substitute_forwarded(SEl) || SEl <- Sub]};
-substitute_forwarded(#carbons_sent{forwarded = Sub} = El) ->
-    El#carbons_sent{forwarded = [substitute_forwarded(SEl) || SEl <- Sub]};
-substitute_forwarded(#message{sub_els = Sub} = El) ->
-    El#message{sub_els = [substitute_forwarded(SEl) || SEl <- Sub]};
-substitute_forwarded(#forwarded{delay = Delay, xml_els = Sub}) ->
-    #forwarded_decoded{delay = Delay, sub_els = [xmpp:decode(SEl) || SEl <- Sub]};
-substitute_forwarded(El) ->
-    El.
-
-
-
 decode(El, NS, Opts) ->
     try
-       Pkt = substitute_forwarded(xmpp:decode(El, NS, Opts)),
+       Pkt = xmpp:decode(El, NS, Opts),
        ct:pal("RECV:~n~s~n~s",
               [format_element(El), xmpp:pp(Pkt)]),
        Pkt
index d9a9c5ab0cf15df9e3bdbb022a32ee644ec45c14..00239f8cf0413624554118e189159eec95b41232 100644 (file)
@@ -5,9 +5,6 @@
 -include("mod_proxy65.hrl").
 -include("xmpp_codec.hrl").
 
--record(forwarded_decoded, {delay :: #delay{},
-                           sub_els = [] :: [fxml:xmlel()]}).
-
 -define(STREAM_TRAILER, <<"</stream:stream>">>).
 
 -define(PUBSUB(Node), <<(?NS_PUBSUB)/binary, "#", Node>>).