If the maxHistoryLength is negative, make it 0
Instead of doing a broken SQL request that returns weird lines
This commit is contained in:
@@ -136,8 +136,10 @@ void Database::store_muc_message(const std::string& owner, const Iid& iid,
|
||||
line.update();
|
||||
}
|
||||
|
||||
std::vector<db::MucLogLine> Database::get_muc_logs(const std::string& owner, const std::string& chan_name, const std::string& server, const int limit)
|
||||
std::vector<db::MucLogLine> Database::get_muc_logs(const std::string& owner, const std::string& chan_name, const std::string& server, int limit)
|
||||
{
|
||||
if (limit < 0)
|
||||
limit = 0;
|
||||
auto res = litesql::select<db::MucLogLine>(*Database::db,
|
||||
db::MucLogLine::Owner == owner &&
|
||||
db::MucLogLine::IrcChanName == chan_name &&
|
||||
|
||||
Reference in New Issue
Block a user