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:
+3
-1
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user