aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-05-28 00:47:50 +0200
committerKim Alvefur <zash@zash.se>2019-05-28 00:47:50 +0200
commita52c045f4a8b7e11eac9b6ba4cf72e0a920594e5 (patch)
treec344febedb8ed7236256dce1fb913f0ac91e80e9 /plugins
parent8799bf12c702335a32d1d220269090f653230b0d (diff)
downloadprosody-a52c045f4a8b7e11eac9b6ba4cf72e0a920594e5.tar.gz
prosody-a52c045f4a8b7e11eac9b6ba4cf72e0a920594e5.zip
mod_storage_sql: Fix to use correct arguments to archive id lookup
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_storage_sql.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua
index cfc8450c..ad2de840 100644
--- a/plugins/mod_storage_sql.lua
+++ b/plugins/mod_storage_sql.lua
@@ -336,7 +336,7 @@ local function archive_where_id_range(query, args, where)
]];
if query.after then -- keys better be unique!
local after_id = nil;
- for row in engine:select(id_lookup_sql, query.after, host, user or "", store) do
+ for row in engine:select(id_lookup_sql, query.after, args[1], args[2], args[3]) do
after_id = row[1];
end
if not after_id then
@@ -347,7 +347,7 @@ local function archive_where_id_range(query, args, where)
end
if query.before then
local before_id = nil;
- for row in engine:select(id_lookup_sql, query.after, host, user or "", store) do
+ for row in engine:select(id_lookup_sql, query.after, args[1], args[2], args[3]) do
before_id = row[1];
end
if not before_id then