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);
|
||||
_ -> From
|
||||
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;
|
||||
fix_from_to(Pkt, _State) ->
|
||||
Pkt.
|
||||
|
|
Loading…
Reference in New Issue