15 std::vector<Message> messages;
16 std::vector<std::string> users;
26 Dialog(std::string from, std::string to);
57 bool sendMessage(
const std::string& sender, std::string message);
59 void displayMessages()
const;
Represents a dialog between two users.
Definition dialog.hpp:13
std::string getToUser() const
get the username of the receiver
bool sendMessage(const std::string &sender, std::string message)
Sends a message in the dialog.
~Dialog()
Destroy the Dialog object.
std::string getFromUser() const
get the username of the sender
bool deleteMessage(size_t index)
delete a message from the dialog
std::vector< Message > getAllMessages() const
get all messages in the dialog
Dialog(std::string from, std::string to)
Constructs a Dialog object.