Software /
code /
prosody-modules
Changeset
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 |
parents | 1368:5724008bbdb1 |
children | 1370:e3fe6c749bc3 |
files | mod_mam/mod_mam.lua mod_mam_muc/mod_mam_muc.lua |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_mam/mod_mam.lua Thu Mar 20 15:55:37 2014 +0100 +++ b/mod_mam/mod_mam.lua Sun Mar 23 22:35:27 2014 +0100 @@ -34,7 +34,7 @@ local archive_store = "archive2"; local archive = module:open_store(archive_store, "archive"); -if not archive then +if not archive or archive.name == "null" then module:log("error", "Could not open archive storage"); return elseif not archive.find then
--- a/mod_mam_muc/mod_mam_muc.lua Thu Mar 20 15:55:37 2014 +0100 +++ b/mod_mam_muc/mod_mam_muc.lua Sun Mar 23 22:35:27 2014 +0100 @@ -32,7 +32,7 @@ local archive_store = "archive2"; local archive = module:open_store(archive_store, "archive"); -if not archive then +if not archive or archive.name == "null" then module:log("error", "Could not open archive storage"); return elseif not archive.find then