aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2020-06-12 16:54:38 +0100
committerMatthew Wild <mwild1@gmail.com>2020-06-12 16:54:38 +0100
commit371d05a0c6f7a9353155588d617a1efd468fd9d0 (patch)
tree9eb755efa67180457349ebe393158252ab671e49 /plugins
parent9dfc424f2e747e58f5aae40abb73e9e9e3639990 (diff)
downloadprosody-371d05a0c6f7a9353155588d617a1efd468fd9d0.tar.gz
prosody-371d05a0c6f7a9353155588d617a1efd468fd9d0.zip
mod_storage_sql: Fix incorrect results when fetching items before specific archive id
Copy/paste error, introduced in deb68066c7aa
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_storage_sql.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua
index 30e38d49..67e7ad17 100644
--- a/plugins/mod_storage_sql.lua
+++ b/plugins/mod_storage_sql.lua
@@ -391,7 +391,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, args[1], args[2], args[3]) do
+ for row in engine:select(id_lookup_sql, query.before, args[1], args[2], args[3]) do
before_id = row[1];
end
if not before_id then