mod_mam: Generate debug info when removing message

This commit is contained in:
Holger Weiss 2015-02-11 23:34:02 +01:00
parent 078ba3ace6
commit 671655eaee
1 changed files with 3 additions and 1 deletions

View File

@ -463,7 +463,9 @@ store_message(#mam_meta{mam_jid = US, first_id = FirstID, last_id = LastID} =
UpdateMsgTab = UpdateMsgTab =
fun() -> fun() ->
DeleteMsg = fun(DelID) -> DeleteMsg = fun(DelID) ->
mnesia:delete({mam_msg, {US, DelID}}) Key = {US, DelID},
?DEBUG("Deleting MAM message ~w", [Key]),
mnesia:delete({mam_msg, Key})
end, end,
lists:foreach(DeleteMsg, lists:seq(FirstID, NewFirstID - 1)), lists:foreach(DeleteMsg, lists:seq(FirstID, NewFirstID - 1)),
mnesia:write(Msg#mam_msg{key = {US, ID}, time = os:timestamp()}) mnesia:write(Msg#mam_msg{key = {US, ID}, time = os:timestamp()})