#pragma once #include "MessagePart.hpp" #include "User.hpp" #include #include namespace dchat { class Message { public: Message(User *user); virtual ~Message(); void addText(const std::string &text, bool newLine = true); void addEmoji(const std::string &url, bool newLine = true); std::vector& getParts(); static Message* buildFromString(User *user, const std::string &str); const User *user; private: std::vector messageParts; }; }