mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +01:00
mod_mam: Make sure stanza IDs aren't reused
Strip the stanza ID from the metadata of outgoing messages to make sure it's not reused for the (local) recipient's MAM archive.
This commit is contained in:
parent
2d45832a39
commit
cdfd0cce7b
@ -369,7 +369,9 @@ user_send_packet(Acc) ->
|
||||
-> {stanza(), c2s_state()}.
|
||||
user_send_packet_strip_tag({#message{} = Pkt, #{jid := JID} = C2SState}) ->
|
||||
LServer = JID#jid.lserver,
|
||||
{strip_my_stanza_id(Pkt, LServer), C2SState};
|
||||
Pkt1 = xmpp:del_meta(Pkt, stanza_id),
|
||||
Pkt2 = strip_my_stanza_id(Pkt1, LServer),
|
||||
{Pkt2, C2SState};
|
||||
user_send_packet_strip_tag(Acc) ->
|
||||
Acc.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user