# HG changeset patch # User Kim Alvefur # Date 1378387351 -7200 # Node ID 30b681898c2df5ac1caf5cf912cff93e89f0471d # Parent 0d3d15586d7e426bc29117ab1a202d817fd015e3 mod_mam: Log error message if unable to open archive storage diff -r 0d3d15586d7e -r 30b681898c2d mod_mam/mod_mam.lua --- a/mod_mam/mod_mam.lua Thu Sep 05 01:02:01 2013 +0200 +++ b/mod_mam/mod_mam.lua Thu Sep 05 15:22:31 2013 +0200 @@ -34,6 +34,13 @@ local archive_store = "archive2"; local archive = module:open_store(archive_store, "archive"); +if not archive then + module:log("error", "Could not open archive storage"); + return +elseif not archive.find then + module:log("error", "mod_%s does not support archiving, switch to mod_storage_sql2", archive._provided_by); + return +end -- Handle prefs. module:hook("iq/self/"..xmlns_mam..":prefs", function(event)