Always return the oldest matching messages from MAM, even if no date is set

This commit is contained in:
louiz’
2018-02-10 17:47:42 +01:00
parent e0d1a0b44a
commit 99389eefba
5 changed files with 40 additions and 11 deletions
+1 -1
View File
@@ -1020,7 +1020,7 @@ void Bridge::send_room_history(const std::string& hostname, std::string chan_nam
auto limit = coptions.col<Database::MaxHistoryLength>();
if (history_limit.stanzas >= 0 && history_limit.stanzas < limit)
limit = history_limit.stanzas;
const auto lines = Database::get_muc_logs(this->user_jid, chan_name, hostname, limit, history_limit.since);
const auto lines = Database::get_muc_most_recent_logs(this->user_jid, chan_name, hostname, limit, history_limit.since);
chan_name.append(utils::empty_if_fixed_server("%" + hostname));
for (const auto& line: lines)
{