mod_mam/mod_mam.lua
changeset 1185 30b681898c2d
parent 1152 01fa82074b62
child 1186 a172e7389cf6
--- 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)