diff options
author | Kim Alvefur <zash@zash.se> | 2017-07-06 11:24:36 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-07-06 11:24:36 +0200 |
commit | aca11d8afe0573dd1573356bd14edd4bb823a187 (patch) | |
tree | d54d6743becde2246fed6859f25ec6ee72e0d080 /plugins | |
parent | f99d0138bf2fc1eefcc8954e2a3d0ac41419ca85 (diff) | |
parent | b5181287340558c4e97cd2a3b08b84840cd80c9a (diff) | |
download | prosody-aca11d8afe0573dd1573356bd14edd4bb823a187.tar.gz prosody-aca11d8afe0573dd1573356bd14edd4bb823a187.zip |
Merge 0.10->trunk
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_mam/mod_mam.lua | 2 | ||||
-rw-r--r-- | plugins/mod_storage_internal.lua | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/plugins/mod_mam/mod_mam.lua b/plugins/mod_mam/mod_mam.lua index b40b8a9a..1dcce4e4 100644 --- a/plugins/mod_mam/mod_mam.lua +++ b/plugins/mod_mam/mod_mam.lua @@ -141,7 +141,7 @@ module:hook("iq-set/self/"..xmlns_mam..":query", function(event) limit = qmax + 1; before = before; after = after; reverse = reverse; - total = use_total; + total = use_total or qmax == 0; }); if not data then diff --git a/plugins/mod_storage_internal.lua b/plugins/mod_storage_internal.lua index 0a382cee..76052575 100644 --- a/plugins/mod_storage_internal.lua +++ b/plugins/mod_storage_internal.lua @@ -62,7 +62,13 @@ end function archive:find(username, query) local items, err = datamanager.list_load(username, host, self.store); - if not items then return items, err; end + if not items then + if err then + return items, err; + else + return function () end, 0; + end + end local count = #items; local i = 0; if query then |