19 Message(std::string from, std::string to, std::string message);
54 [[nodiscard]] std::chrono::system_clock::time_point
getTimestamp()
const;
67 std::chrono::system_clock::time_point timestamp;
Represents a message exchanged between two users.
Definition message.hpp:11
std::string toString() const
Converts the message to a string representation.
~Message()
destroy the Message object
std::string getFormatTimestamp() const
Converts the timestamp to a string representation.
std::string getFromUser() const
Gets the username of the sender.
std::string getToUser() const
Gets the username of the receiver.
std::string getMessage() const
Gets the content of the message.
std::chrono::system_clock::time_point getTimestamp() const
Gets the timestamp of when the message was sent.
Message(std::string from, std::string to, std::string message)
construct a Message object