mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-20 17:27:00 +01:00
Get rid of substitute_forwarded
This commit is contained in:
parent
f57f267c54
commit
e69937d93a
@ -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
|
||||
|
@ -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>>).
|
||||
|
Loading…
Reference in New Issue
Block a user