mirror of
https://github.com/processone/ejabberd.git
synced 2024-09-27 14:30:55 +02:00
Do not change to attribute of sent messages from bare to full jid
This is not correct per xmpp spec
This commit is contained in:
parent
633b362577
commit
1ffa9a0cf5
@ -937,7 +937,11 @@ fix_from_to(Pkt, #{jid := JID}) when ?is_stanza(Pkt) ->
|
|||||||
{U, S, _} -> jid:replace_resource(JID, From#jid.resource);
|
{U, S, _} -> jid:replace_resource(JID, From#jid.resource);
|
||||||
_ -> From
|
_ -> From
|
||||||
end,
|
end,
|
||||||
xmpp:set_from_to(Pkt, From1, JID)
|
To1 = case xmpp:get_to(Pkt) of
|
||||||
|
#jid{lresource = <<>>} = To2 -> To2;
|
||||||
|
_ -> JID
|
||||||
|
end,
|
||||||
|
xmpp:set_from_to(Pkt, From1, To1)
|
||||||
end;
|
end;
|
||||||
fix_from_to(Pkt, _State) ->
|
fix_from_to(Pkt, _State) ->
|
||||||
Pkt.
|
Pkt.
|
||||||
|
Loading…
Reference in New Issue
Block a user