# HG changeset patch # User Kim Alvefur # Date 1453475122 -3600 # Node ID f21147d56bc48180973ebc8f122d528a841edaca # Parent 66156e4d5274606adb21187e75ec25aecd0e6918 mod_mam_muc: Yell loudly when archive store can't be opened diff -r 66156e4d5274 -r f21147d56bc4 mod_mam_muc/mod_mam_muc.lua --- a/mod_mam_muc/mod_mam_muc.lua Fri Jan 22 16:04:32 2016 +0100 +++ b/mod_mam_muc/mod_mam_muc.lua Fri Jan 22 16:05:22 2016 +0100 @@ -50,12 +50,16 @@ local archive_store = "muc_log"; local archive = module:open_store(archive_store, "archive"); -if not archive or archive.name == "null" 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 + +if archive.name == "null" or not archive.find then + if not archive.find then + module:log("error", "Attempt to open archive storage returned a valid driver but it does not seem to implement the storage API"); + module:log("error", "mod_%s does not support archiving", archive._provided_by or archive.name and "storage_"..archive.name.."(?)" or ""); + else + module:log("error", "Attempt to open archive storage returned null driver"); + end + module:log("info", "See https://prosody.im/doc/storage and https://prosody.im/doc/archiving for more information"); + return false; end local function logging_enabled(room)