]> granicus.if.org Git - ejabberd/commitdiff
Do not forget to set from/to when fetching from MUC history
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>
Tue, 1 Sep 2015 09:35:08 +0000 (12:35 +0300)
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>
Tue, 1 Sep 2015 09:35:51 +0000 (12:35 +0300)
src/mod_mam.erl

index c10159759402d4fc7c1493ad1d828d086f76c84c..730b2ba910d5fd66d020bfd0a6b4887b22981da1 100644 (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),