25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

Do not forget to set from/to when fetching from MUC history

This commit is contained in:
Evgeniy Khramtsov 2015-09-01 12:35:08 +03:00
parent e24bfe7b62
commit 14ddbce3a9

View File

@ -679,11 +679,9 @@ msg_to_el(#archive_msg{timestamp = TS, packet = Pkt1, nick = Nick, peer = Peer},
xml:replace_tag_attr(
<<"xmlns">>, <<"jabber:client">>, Pkt)]}.
maybe_update_from_to(Pkt, _JIDRequestor, undefined, _Type, _Nick) ->
Pkt;
maybe_update_from_to(Pkt, JidRequestor, Peer, chat, _Nick) ->
case xml:get_attr_s(<<"type">>, Pkt#xmlel.attrs) of
<<"groupchat">> ->
<<"groupchat">> when Peer /= undefined ->
Pkt2 = xml:replace_tag_attr(<<"to">>,
jlib:jid_to_string(JidRequestor),
Pkt),