aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Channel.hpp1
-rw-r--r--include/MessageBoard.hpp2
2 files changed, 3 insertions, 0 deletions
diff --git a/include/Channel.hpp b/include/Channel.hpp
index 5f5699e..af6cbf2 100644
--- a/include/Channel.hpp
+++ b/include/Channel.hpp
@@ -47,6 +47,7 @@ namespace dchat
const std::vector<User*> getUsers() const;
OnlineUser* getUserByPublicKey(const odhtdb::Signature::PublicKey &publicKey);
const odhtdb::DatabaseNode& getNodeInfo() const;
+ Message* getLatestMessage();
// If timestamp is 0, then current time is used
void addLocalMessage(const std::string &msg, User *owner, u64 timestampSeconds = 0);
diff --git a/include/MessageBoard.hpp b/include/MessageBoard.hpp
index 861d195..acdaad4 100644
--- a/include/MessageBoard.hpp
+++ b/include/MessageBoard.hpp
@@ -24,6 +24,8 @@ namespace dchat
void processEvent(const sf::Event &event, Cache &cache);
void draw(sf::RenderWindow &window, Cache &cache);
+
+ Message* getLatestMessage();
private:
usize findPositionToInsertMessageByTimestamp(Message *message);