Software / code / prosody
Comparison
plugins/mod_mam/mod_mam.lua @ 9553:9a5485550bfd
mod_mam: Ignore case of null storage driver
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 25 Oct 2018 21:55:08 +0200 |
| parent | 8905:65d1a80d3565 |
| child | 9554:cba6e6168d26 |
comparison
equal
deleted
inserted
replaced
| 9552:87e25d352de3 | 9553:9a5485550bfd |
|---|---|
| 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 = 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 not archive.find then |
| 44 if not archive.find then | 44 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"); | 45 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>"); | |
| 47 else | |
| 48 module:log("debug", "Attempt to open archive storage returned null driver"); | |
| 49 end | |
| 50 module:log("debug", "See https://prosody.im/doc/storage and https://prosody.im/doc/archiving for more information"); | 46 module:log("debug", "See https://prosody.im/doc/storage and https://prosody.im/doc/archiving for more information"); |
| 51 module:log("info", "Using in-memory fallback archive driver"); | 47 module:log("info", "Using in-memory fallback archive driver"); |
| 52 archive = module:require "fallback_archive"; | 48 archive = module:require "fallback_archive"; |
| 53 end | 49 end |
| 54 | 50 |