summaryrefslogtreecommitdiff
path: root/src/database/database.hpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2018-04-29 22:18:26 +0200
committerlouiz’ <louiz@louiz.org>2018-04-29 22:18:26 +0200
commitb0168fd45b3683c2d6f61ccae67dcd5b918a363d (patch)
tree6b3e035f6edfef0b9a8aac1813259b9c95ebcf35 /src/database/database.hpp
parent0887be6eef24929fd594239e9569fc5cee54aba0 (diff)
downloadbiboumi-b0168fd45b3683c2d6f61ccae67dcd5b918a363d.tar.gz
biboumi-b0168fd45b3683c2d6f61ccae67dcd5b918a363d.tar.bz2
biboumi-b0168fd45b3683c2d6f61ccae67dcd5b918a363d.tar.xz
biboumi-b0168fd45b3683c2d6f61ccae67dcd5b918a363d.zip
mam: Send “fin complete” only when appropriate
Also simplify how we did the whole “limit + 1” And fix one bad interpretation of the XEP for the case where the query has no after or before restriction. fix #3349
Diffstat (limited to 'src/database/database.hpp')
-rw-r--r--src/database/database.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/database/database.hpp b/src/database/database.hpp
index 30ffcb4..3e25b30 100644
--- a/src/database/database.hpp
+++ b/src/database/database.hpp
@@ -131,8 +131,8 @@ class Database
* Get all the lines between (optional) start and end dates, with a (optional) limit.
* If after_id is set, only the records after it will be returned.
*/
- static std::vector<MucLogLine> get_muc_logs(const std::string& owner, const std::string& chan_name, const std::string& server,
- int limit=-1, const std::string& start="", const std::string& end="",
+ static std::tuple<bool, std::vector<MucLogLine>> get_muc_logs(const std::string& owner, const std::string& chan_name, const std::string& server,
+ std::size_t limit, const std::string& start="", const std::string& end="",
const Id::real_type reference_record_id=Id::unset_value, Paging=Paging::first);
/**