Software / code / prosody
Comparison
plugins/mod_storage_sql.lua @ 8138:cb605fb60e32
mod_storage_sql: Fix logic error introduced by variable rename in aa9f198cb3c9 (thanks waqas)
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sun, 30 Apr 2017 10:44:53 +0100 |
| parent | 8082:8ca11201bfe7 |
| child | 8146:5c91fb62338e |
| child | 8292:2fc8b83dd736 |
comparison
equal
deleted
inserted
replaced
| 8137:484ea6201c6c | 8138:cb605fb60e32 |
|---|---|
| 31 return t, tostring(value); | 31 return t, tostring(value); |
| 32 elseif is_stanza(value) then | 32 elseif is_stanza(value) then |
| 33 return "xml", tostring(value); | 33 return "xml", tostring(value); |
| 34 elseif t == "table" then | 34 elseif t == "table" then |
| 35 local encoded,err = json.encode(value); | 35 local encoded,err = json.encode(value); |
| 36 if value then return "json", encoded; end | 36 if encoded then return "json", encoded; end |
| 37 return nil, err; | 37 return nil, err; |
| 38 end | 38 end |
| 39 return nil, "Unhandled value type: "..t; | 39 return nil, "Unhandled value type: "..t; |
| 40 end | 40 end |
| 41 local function deserialize(t, value) | 41 local function deserialize(t, value) |