mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-20 17:27:00 +01:00
Use MUC domain for 'by' attribute of <stanza-id/>
Let mod_mam specify only the domain part of the room JID in the 'by' attribute of <stanza-id/> tags.
This commit is contained in:
parent
0e330da2a6
commit
11ad96fced
@ -200,12 +200,12 @@ user_send_packet(Pkt, C2SState, JID, Peer) ->
|
||||
muc_filter_message(Pkt, #state{config = Config} = MUCState,
|
||||
RoomJID, From, FromNick) ->
|
||||
if Config#config.mam ->
|
||||
By = jid:to_string(RoomJID),
|
||||
NewPkt = strip_my_archived_tag(Pkt, By),
|
||||
LServer = RoomJID#jid.lserver,
|
||||
NewPkt = strip_my_archived_tag(Pkt, LServer),
|
||||
case store_muc(MUCState, NewPkt, RoomJID, From, FromNick) of
|
||||
{ok, ID} ->
|
||||
StanzaID = #xmlel{name = <<"stanza-id">>,
|
||||
attrs = [{<<"by">>, By},
|
||||
attrs = [{<<"by">>, LServer},
|
||||
{<<"xmlns">>, ?NS_SID_0},
|
||||
{<<"id">>, ID}]},
|
||||
NewEls = [StanzaID|NewPkt#xmlel.children],
|
||||
|
Loading…
Reference in New Issue
Block a user