diff options
-rw-r--r-- | plugins/mod_storage_internal.lua | 6 |
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 |