]> granicus.if.org Git - ejabberd/commitdiff
Merge pull request #914 from weiss/mam-expose-jid
authorEvgeny Khramtsov <xramtsov@gmail.com>
Mon, 8 Feb 2016 11:23:19 +0000 (14:23 +0300)
committerEvgeny Khramtsov <xramtsov@gmail.com>
Mon, 8 Feb 2016 11:23:19 +0000 (14:23 +0300)
Expose occupant JID in MUC MAM messages whenever possible

1  2 
src/mod_mam.erl

diff --cc src/mod_mam.erl
index a83c1a647328ca7f16f26f13ed5643152728ec31,75694b6660e55a1f1614ce161b1029e0608caafc..e6f5ac4001dfe77d73e042f30f6d6a80e6c5b820
@@@ -1038,11 -1034,12 +1038,12 @@@ select(LServer, JidRequestor, #jid{luse
      end.
  
  msg_to_el(#archive_msg{timestamp = TS, packet = Pkt1, nick = Nick, peer = Peer},
-         MsgType, #jid{lserver = LServer} = JidRequestor) ->
-     Pkt2 = maybe_update_from_to(Pkt1, JidRequestor, Peer, MsgType, Nick),
+         MsgType, JidRequestor, #jid{lserver = LServer} = JidArchive) ->
+     Pkt2 = maybe_update_from_to(Pkt1, JidRequestor, JidArchive, Peer, MsgType,
+                               Nick),
      Pkt3 = #xmlel{name = <<"forwarded">>,
                  attrs = [{<<"xmlns">>, ?NS_FORWARD}],
 -                children = [xml:replace_tag_attr(
 +                children = [fxml:replace_tag_attr(
                                <<"xmlns">>, <<"jabber:client">>, Pkt2)]},
      jlib:add_delay_info(Pkt3, LServer, TS).