Changeset

8350:3ca11d408382

mod_storage_xep0227: Correctly report that only key-value stores are supported
author Kim Alvefur <zash@zash.se>
date Thu, 19 Oct 2017 12:21:49 +0200
parents 8349:2342eccf4a88
children 8351:cc05b6366576
files plugins/mod_storage_xep0227.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_storage_xep0227.lua	Wed Oct 25 01:32:30 2017 +0200
+++ b/plugins/mod_storage_xep0227.lua	Thu Oct 19 12:21:49 2017 +0200
@@ -168,6 +168,7 @@
 local driver = {};
 
 function driver:open(datastore, typ)
+	if typ and typ ~= "keyval" then return nil, "unsupported-store"; end
 	local handler = handlers[datastore];
 	if not handler then return nil, "unsupported-datastore"; end
 	local instance = setmetatable({ host = module.host; datastore = datastore; }, { __index = handler });