aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-05-19 18:21:23 +0200
committerKim Alvefur <zash@zash.se>2015-05-19 18:21:23 +0200
commitd6f06fa146cb0e7d6baee40a3e7037cdb4f0ab6a (patch)
tree2a818979f570f3d4a737a4bead0072d50ecf5ee4 /plugins
parente909a53de56e66db08941f06f796b1bedda95a1f (diff)
downloadprosody-d6f06fa146cb0e7d6baee40a3e7037cdb4f0ab6a.tar.gz
prosody-d6f06fa146cb0e7d6baee40a3e7037cdb4f0ab6a.zip
mod_storage_sql2: Include 'with' field from iterator like some 3rd party archive-capable storage modules
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_storage_sql2.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_storage_sql2.lua b/plugins/mod_storage_sql2.lua
index d5e0494f..c02ad42c 100644
--- a/plugins/mod_storage_sql2.lua
+++ b/plugins/mod_storage_sql2.lua
@@ -281,7 +281,7 @@ function archive_store:find(username, query)
local user,store = username,self.store;
local total;
local ok, result = engine:transaction(function()
- local sql_query = "SELECT `key`, `type`, `value`, `when` FROM `prosodyarchive` WHERE %s ORDER BY `sort_id` %s%s;";
+ local sql_query = "SELECT `key`, `type`, `value`, `when`, `with` FROM `prosodyarchive` WHERE %s ORDER BY `sort_id` %s%s;";
local args = { host, user or "", store, };
local where = { "`host` = ?", "`user` = ?", "`store` = ?", };
@@ -313,7 +313,7 @@ function archive_store:find(username, query)
return function()
local row = result();
if row ~= nil then
- return row[1], deserialize(row[2], row[3]), row[4];
+ return row[1], deserialize(row[2], row[3]), row[4], row[5];
end
end, total;
end