From 671655eaee77d2d017af2091cd48611dd0445f5f Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Wed, 11 Feb 2015 23:34:02 +0100 Subject: [PATCH] mod_mam: Generate debug info when removing message --- mod_mam/src/mod_mam.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mod_mam/src/mod_mam.erl b/mod_mam/src/mod_mam.erl index 4a76a6c..d068b42 100644 --- a/mod_mam/src/mod_mam.erl +++ b/mod_mam/src/mod_mam.erl @@ -463,7 +463,9 @@ store_message(#mam_meta{mam_jid = US, first_id = FirstID, last_id = LastID} = UpdateMsgTab = fun() -> DeleteMsg = fun(DelID) -> - mnesia:delete({mam_msg, {US, DelID}}) + Key = {US, DelID}, + ?DEBUG("Deleting MAM message ~w", [Key]), + mnesia:delete({mam_msg, Key}) end, lists:foreach(DeleteMsg, lists:seq(FirstID, NewFirstID - 1)), mnesia:write(Msg#mam_msg{key = {US, ID}, time = os:timestamp()})