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
This commit is contained in:
louiz’
2018-04-29 22:18:26 +02:00
parent 0887be6eef
commit b0168fd45b
5 changed files with 37 additions and 35 deletions
+2 -2
View File
@@ -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);
/**