aboutsummaryrefslogtreecommitdiff
path: root/include/Message.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/Message.hpp')
-rw-r--r--include/Message.hpp27
1 files changed, 9 insertions, 18 deletions
diff --git a/include/Message.hpp b/include/Message.hpp
index 2327a0b..0541574 100644
--- a/include/Message.hpp
+++ b/include/Message.hpp
@@ -1,29 +1,20 @@
#pragma once
-#include "User.hpp"
+#include <memory>
#include "Text.hpp"
-#include <string>
-#include <vector>
-#include <odhtdb/Hash.hpp>
namespace dchat
{
+ struct RoomMessage;
+
class Message
{
public:
- enum class Type
- {
- REGULAR,
- EDITED
- };
-
- // If timestamp is 0, then timestamp is not used
- Message(User *user, const std::string &text, u64 timestampSeconds = 0, bool plainText = false);
-
- const User *user;
+ Message(std::shared_ptr<RoomMessage> roomMessage, bool plainText);
+
+ std::shared_ptr<RoomMessage> roomMessage;
Text text;
- const u64 timestampSeconds;
- Type type;
- odhtdb::Hash id;
+
+ bool onlineUser;
};
-}
+} \ No newline at end of file