Software /
code /
prosody
Comparison
plugins/mod_storage_memory.lua @ 10023:f6959fe81a1d
mod_storage_memory: Return correct error even if no archive data available
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 05 May 2019 07:22:18 +0200 |
parent | 10019:c30c81176752 |
child | 10220:1e2b444acb72 |
comparison
equal
deleted
inserted
replaced
10022:b56654f89cd5 | 10023:f6959fe81a1d |
---|---|
89 | 89 |
90 function archive_store:find(username, query) | 90 function archive_store:find(username, query) |
91 local items = self.store[username or NULL]; | 91 local items = self.store[username or NULL]; |
92 if not items then | 92 if not items then |
93 if query then | 93 if query then |
94 if query.before or query.after then | |
95 return nil, "item-not-found"; | |
96 end | |
94 if query.total then | 97 if query.total then |
95 return function () end, 0; | 98 return function () end, 0; |
96 end | 99 end |
97 end | 100 end |
98 return function () end; | 101 return function () end; |