Software /
code /
prosody-modules
Comparison
mod_storage_ldap/mod_storage_ldap.lua @ 2299:e099586f9de5
mod_storage_ldap: Handle being passed an explicit storage "type" (fixes #654)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 17 Sep 2016 18:04:46 +0200 |
parent | 813:2469f779b3f7 |
comparison
equal
deleted
inserted
replaced
2298:a59671b3dd43 | 2299:e099586f9de5 |
---|---|
170 local driver = {}; | 170 local driver = {}; |
171 | 171 |
172 function driver:open(store, typ) | 172 function driver:open(store, typ) |
173 local adapter = adapters[store]; | 173 local adapter = adapters[store]; |
174 | 174 |
175 if adapter and not typ then | 175 if adapter and typ == nil or typ == "keyval" then |
176 return adapter; | 176 return adapter; |
177 end | 177 end |
178 return nil, "unsupported-store"; | 178 return nil, "unsupported-store"; |
179 end | 179 end |
180 module:provides("storage", driver); | 180 module:provides("storage", driver); |