Software /
code /
prosody
Diff
plugins/mod_storage_sql.lua @ 7169:d00d8cfcc9a8
mod_storage_sql: Fix setting value to false in map store
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 19 Feb 2016 19:22:18 +0100 |
parent | 7156:18b7ffd08d56 |
child | 7170:fb37aece3252 |
line wrap: on
line diff
--- a/plugins/mod_storage_sql.lua Fri Feb 19 12:15:02 2016 +0000 +++ b/plugins/mod_storage_sql.lua Fri Feb 19 19:22:18 2016 +0100 @@ -148,7 +148,8 @@ return result; end function map_store:set(username, key, data) - return self:set_keys(username, { [key] = data or self.remove }); + if data == nil then data = self.remove; end + return self:set_keys(username, { [key] = data }); end function map_store:set_keys(username, keydatas) local ok, result = engine:transaction(function()