Comparison

mod_mam_muc/mod_mam_muc.lua @ 1369:8be609f5610e

mod_mam, mod_mam_muc: Check that storagemanager didn't return an instance of the null storage method (Thanks Jonathan)
author Kim Alvefur <zash@zash.se>
date Sun, 23 Mar 2014 22:35:27 +0100
parent 1325:b21236b6b8d8
child 1382:ba17268490b7
comparison
equal deleted inserted replaced
1368:5724008bbdb1 1369:8be609f5610e
30 local log_by_default = module:get_option_boolean("muc_log_by_default", true); 30 local log_by_default = module:get_option_boolean("muc_log_by_default", true);
31 local advertise_archive = module:get_option_boolean("muc_log_advertise", true); 31 local advertise_archive = module:get_option_boolean("muc_log_advertise", true);
32 32
33 local archive_store = "archive2"; 33 local archive_store = "archive2";
34 local archive = module:open_store(archive_store, "archive"); 34 local archive = module:open_store(archive_store, "archive");
35 if not archive then 35 if not archive or archive.name == "null" then
36 module:log("error", "Could not open archive storage"); 36 module:log("error", "Could not open archive storage");
37 return 37 return
38 elseif not archive.find then 38 elseif not archive.find then
39 module:log("error", "mod_%s does not support archiving, switch to mod_storage_sql2", archive._provided_by); 39 module:log("error", "mod_%s does not support archiving, switch to mod_storage_sql2", archive._provided_by);
40 return 40 return