mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +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,
|
muc_filter_message(Pkt, #state{config = Config} = MUCState,
|
||||||
RoomJID, From, FromNick) ->
|
RoomJID, From, FromNick) ->
|
||||||
if Config#config.mam ->
|
if Config#config.mam ->
|
||||||
By = jid:to_string(RoomJID),
|
LServer = RoomJID#jid.lserver,
|
||||||
NewPkt = strip_my_archived_tag(Pkt, By),
|
NewPkt = strip_my_archived_tag(Pkt, LServer),
|
||||||
case store_muc(MUCState, NewPkt, RoomJID, From, FromNick) of
|
case store_muc(MUCState, NewPkt, RoomJID, From, FromNick) of
|
||||||
{ok, ID} ->
|
{ok, ID} ->
|
||||||
StanzaID = #xmlel{name = <<"stanza-id">>,
|
StanzaID = #xmlel{name = <<"stanza-id">>,
|
||||||
attrs = [{<<"by">>, By},
|
attrs = [{<<"by">>, LServer},
|
||||||
{<<"xmlns">>, ?NS_SID_0},
|
{<<"xmlns">>, ?NS_SID_0},
|
||||||
{<<"id">>, ID}]},
|
{<<"id">>, ID}]},
|
||||||
NewEls = [StanzaID|NewPkt#xmlel.children],
|
NewEls = [StanzaID|NewPkt#xmlel.children],
|
||||||
|
Loading…
Reference in New Issue
Block a user