mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
mod_mam: Don't replace existing stanza ID
Preserve the original stanza ID for resent messages. This avoids storing duplicates in the MAM archive.
This commit is contained in:
parent
3099702039
commit
bb76da03ea
@ -404,6 +404,8 @@ get_stanza_id(#message{meta = #{stanza_id := ID}}) ->
|
||||
ID.
|
||||
|
||||
-spec init_stanza_id(stanza(), binary()) -> stanza().
|
||||
init_stanza_id(#message{meta = #{stanza_id := _ID}} = Pkt, _LServer) ->
|
||||
Pkt;
|
||||
init_stanza_id(Pkt, LServer) ->
|
||||
ID = p1_time_compat:system_time(micro_seconds),
|
||||
Pkt1 = strip_my_stanza_id(Pkt, LServer),
|
||||
|
Loading…
Reference in New Issue
Block a user