mirror of
https://github.com/processone/ejabberd.git
synced 2024-06-18 22:15:20 +02:00
Don't send XEP-0280 v1 copies back to sender
An earlier version of XEP-0280 specified the <received/> and <sent/> tags to be siblings of the <forwarded/> element, whereas the current version mandates them to be parents of <forwarded/>. The mod_carboncopy module supports both variants. However, the check that makes sure clients won't receive a copy of the messages they sent didn't work for the old-style schema. This is now fixed.
This commit is contained in:
parent
2cd17c7988
commit
ad2d3964ef
|
@ -153,9 +153,14 @@ check_and_forward(JID, To, #xmlel{name = <<"message">>, attrs = Attrs} = Packet,
|
||||||
if SubTag == false ->
|
if SubTag == false ->
|
||||||
send_copies(JID, To, Packet, Direction);
|
send_copies(JID, To, Packet, Direction);
|
||||||
true ->
|
true ->
|
||||||
case xml:get_subtag(SubTag,<<"forwarded">>) of
|
case xml:get_subtag(Packet,<<"forwarded">>) of
|
||||||
false->
|
false->
|
||||||
send_copies(JID, To, Packet, Direction);
|
case xml:get_subtag(SubTag,<<"forwarded">>) of
|
||||||
|
false ->
|
||||||
|
send_copies(JID, To, Packet, Direction);
|
||||||
|
_ ->
|
||||||
|
stop
|
||||||
|
end;
|
||||||
_ ->
|
_ ->
|
||||||
stop
|
stop
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user