diff options
author | louiz’ <louiz@louiz.org> | 2018-02-10 17:36:33 +0100 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2018-02-10 17:47:42 +0100 |
commit | 99389eefba1883753c15c6f411fb8543c93f58a1 (patch) | |
tree | 5378f59a336f24f0e37eebf570eb965074aebe57 /src/database/database.hpp | |
parent | e0d1a0b44add408504e428d6ce4a8a2121ea7a00 (diff) | |
download | biboumi-99389eefba1883753c15c6f411fb8543c93f58a1.tar.gz biboumi-99389eefba1883753c15c6f411fb8543c93f58a1.tar.bz2 biboumi-99389eefba1883753c15c6f411fb8543c93f58a1.tar.xz biboumi-99389eefba1883753c15c6f411fb8543c93f58a1.zip |
Always return the oldest matching messages from MAM, even if no date is set
Diffstat (limited to 'src/database/database.hpp')
-rw-r--r-- | src/database/database.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/database/database.hpp b/src/database/database.hpp index ec44543..f9aed2b 100644 --- a/src/database/database.hpp +++ b/src/database/database.hpp @@ -118,8 +118,17 @@ class Database static IrcChannelOptions get_irc_channel_options_with_server_and_global_default(const std::string& owner, const std::string& server, const std::string& channel); + /** + * Get all the lines between (optional) start and end dates, with a (optional) limit. + */ 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=""); + + /** + * Get the most recent messages from the archive, with optional limit and start date + */ + static std::vector<MucLogLine> get_muc_most_recent_logs(const std::string& owner, const std::string& chan_name, const std::string& server, + int limit=-1, const std::string& start=""); static std::string store_muc_message(const std::string& owner, const std::string& chan_name, const std::string& server_name, time_point date, const std::string& body, const std::string& nick); |