mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 09:49:18 +02: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
1 changed files with 3 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue