aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_storage_internal.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-05-15 21:26:54 +0200
committerKim Alvefur <zash@zash.se>2020-05-15 21:26:54 +0200
commite32f71d3d4ee4a69f57bf6891f8a255fa884f4ba (patch)
tree9da1364fef20e514e3b3fb2b794abd24fe9919f1 /plugins/mod_storage_internal.lua
parentd916ce38f6b434552a5ebd2a1751286da9cf2d69 (diff)
parentfaa381e3edc0ff5e44e0ff78b65b683a3ffe1d70 (diff)
downloadprosody-e32f71d3d4ee4a69f57bf6891f8a255fa884f4ba.tar.gz
prosody-e32f71d3d4ee4a69f57bf6891f8a255fa884f4ba.zip
Merge 0.11->trunk
Diffstat (limited to 'plugins/mod_storage_internal.lua')
-rw-r--r--plugins/mod_storage_internal.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/mod_storage_internal.lua b/plugins/mod_storage_internal.lua
index 472ec642..3998165b 100644
--- a/plugins/mod_storage_internal.lua
+++ b/plugins/mod_storage_internal.lua
@@ -150,12 +150,14 @@ function archive:find(username, query)
end
if query.start then
items:filter(function (item)
- return item.when >= query.start;
+ local when = item.when or datetime.parse(item.attr.stamp);
+ return when >= query.start;
end);
end
if query["end"] then
items:filter(function (item)
- return item.when <= query["end"];
+ local when = item.when or datetime.parse(item.attr.stamp);
+ return when <= query["end"];
end);
end
if query.total then