Comparison

plugins/mod_mam/mod_mam.lua @ 8047:eb9784561387

mod_mam: Remove extraneous assert when opening the store
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sun, 02 Apr 2017 19:38:52 +0100
parent 8000:42dd766cfe97
child 8132:6ddddfe05a74
comparison
equal deleted inserted replaced
8045:55a56dc935f2 8047:eb9784561387
36 local timestamp, timestamp_parse = require "util.datetime".datetime, require "util.datetime".parse; 36 local timestamp, timestamp_parse = require "util.datetime".datetime, require "util.datetime".parse;
37 local default_max_items, max_max_items = 20, module:get_option_number("max_archive_query_results", 50); 37 local default_max_items, max_max_items = 20, module:get_option_number("max_archive_query_results", 50);
38 local strip_tags = module:get_option_set("dont_archive_namespaces", { "http://jabber.org/protocol/chatstates" }); 38 local strip_tags = module:get_option_set("dont_archive_namespaces", { "http://jabber.org/protocol/chatstates" });
39 39
40 local archive_store = module:get_option_string("archive_store", "archive"); 40 local archive_store = module:get_option_string("archive_store", "archive");
41 local archive = assert(module:open_store(archive_store, "archive")); 41 local archive = module:open_store(archive_store, "archive");
42 42
43 if archive.name == "null" or not archive.find then 43 if archive.name == "null" or not archive.find then
44 if not archive.find then 44 if not archive.find then
45 module:log("debug", "Attempt to open archive storage returned a valid driver but it does not seem to implement the storage API"); 45 module:log("debug", "Attempt to open archive storage returned a valid driver but it does not seem to implement the storage API");
46 module:log("debug", "mod_%s does not support archiving", archive._provided_by or archive.name and "storage_"..archive.name.."(?)" or "<unknown>"); 46 module:log("debug", "mod_%s does not support archiving", archive._provided_by or archive.name and "storage_"..archive.name.."(?)" or "<unknown>");