aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_storage_internal.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-05-05 07:24:12 +0200
committerKim Alvefur <zash@zash.se>2019-05-05 07:24:12 +0200
commit99f6c695075dc4a93deb5aea4e8acaf635d48fdb (patch)
tree9efc30672ff5003114126798f6489f9883ff856e /plugins/mod_storage_internal.lua
parent63333b90631e5b3d7c955ec3c0c2e9eae204faf7 (diff)
downloadprosody-99f6c695075dc4a93deb5aea4e8acaf635d48fdb.tar.gz
prosody-99f6c695075dc4a93deb5aea4e8acaf635d48fdb.zip
mod_storage_internal: Return appropriate error even with empty archive
Diffstat (limited to 'plugins/mod_storage_internal.lua')
-rw-r--r--plugins/mod_storage_internal.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_storage_internal.lua b/plugins/mod_storage_internal.lua
index fdce3c98..2556224d 100644
--- a/plugins/mod_storage_internal.lua
+++ b/plugins/mod_storage_internal.lua
@@ -125,6 +125,9 @@ function archive:find(username, query)
if err then
return items, err;
elseif query then
+ if query.before or query.after then
+ return nil, "item-not-found";
+ end
if query.total then
return function () end, 0;
end