diff options
author | Kim Alvefur <zash@zash.se> | 2018-08-04 15:44:38 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-08-04 15:44:38 +0200 |
commit | ad2d64f657914b8c3fecbc0c70d4652b6b215cf9 (patch) | |
tree | 5cbdb660e26be32a793bcd9c2d8f47808b86a7cf | |
parent | 671694c5e78a91d58d17e2f1255b01a0ae997fea (diff) | |
download | prosody-ad2d64f657914b8c3fecbc0c70d4652b6b215cf9.tar.gz prosody-ad2d64f657914b8c3fecbc0c70d4652b6b215cf9.zip |
mod_storage_internal: Only apply truncate if there are more items than requested
-rw-r--r-- | plugins/mod_storage_internal.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_storage_internal.lua b/plugins/mod_storage_internal.lua index 27bd8830..42b451bd 100644 --- a/plugins/mod_storage_internal.lua +++ b/plugins/mod_storage_internal.lua @@ -191,7 +191,7 @@ function archive:delete(username, query) return item.when > query["end"]; end); end - if query.truncate then + if query.truncate and #items > query.truncate then if query.reverse then -- Before: { 1, 2, 3, 4, 5, } -- After: { 1, 2, 3 } |