Add the archive ID to messages when they are sent to users This makes us compatible with mam 6.0 fix #3249
Remove two sneaky log_debug
Properly convert the data into a number of seconds by using duration_cast
Look for uuid/uuid.h instead of just uuid.h Avoids a conflict between /usr/include/uuid.h and /usr/local/include/uuid/uuid.h on freebsd
MAM results can be filtered by start and end dates
Respond to MAM requests on a channel JID At the moment, result-set-management is not implemented, the whole history (well, at most 1024 messages) is returned.
If the maxHistoryLength is negative, make it 0 Instead of doing a broken SQL request that returns weird lines
When joining a channel, send the most recent history found in the database
When saving the logs, the date must be in seconds, not nanoseconds
Add a global configure ad-hoc command, with max history length
Add get_first_non_empty and use it into Database to simplify a little bit
Save received and sent messages into the database
Properly catch and handle database errors Do not use a singleton for the database. fix #3203
Replace all include guards by #pragma once It’s $CURRENT_YEAR
Style fix Move all constructors at the top of classes
Add a ChannelOptions table in the DB And a way to retrieve its values, defaulting on the ServerOptions for unset values.
Remove a write to std::cout from Database’s constructor
Only compile database.cpp if configured with litesql
Introduce an optional Database module Uses litesql