X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=plugins%2Fmod_storage_sql.lua;h=a5bb5bfa5cddb621e32a6a6b0c1515e8891fc6ca;hb=244d4d026d5077bac452ea1c7660776e322164e3;hp=7b810ab854a436c6dd16923aceb802c72f3bf074;hpb=c49aa28dbba39243deba5502639e801d8ebeb3aa;p=prosody.git diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua index 7b810ab8..a5bb5bfa 100644 --- a/plugins/mod_storage_sql.lua +++ b/plugins/mod_storage_sql.lua @@ -380,10 +380,10 @@ end local driver = {}; function driver:open(store, typ) - if not typ then -- default key-value store - return setmetatable({ store = store }, keyval_store); + if typ and typ ~= "keyval" then + return nil, "unsupported-store"; end - return nil, "unsupported-store"; + return setmetatable({ store = store }, keyval_store); end function driver:stores(username)