aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mod_carboncopy.erl9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mod_carboncopy.erl b/src/mod_carboncopy.erl
index 124a15f35..009d17ed2 100644
--- a/src/mod_carboncopy.erl
+++ b/src/mod_carboncopy.erl
@@ -153,9 +153,14 @@ check_and_forward(JID, To, #xmlel{name = <<"message">>, attrs = Attrs} = Packet,
if SubTag == false ->
send_copies(JID, To, Packet, Direction);
true ->
- case xml:get_subtag(SubTag,<<"forwarded">>) of
+ case xml:get_subtag(Packet,<<"forwarded">>) of
false->
- send_copies(JID, To, Packet, Direction);
+ case xml:get_subtag(SubTag,<<"forwarded">>) of
+ false ->
+ send_copies(JID, To, Packet, Direction);
+ _ ->
+ stop
+ end;
_ ->
stop
end