This project implements a basic messaging system that supports user-to-user and user-to-group messaging.
- User-to-User Messaging: Send messages between individual users.
- User-to-Group Messaging: Send messages to groups of users.
- Message Attributes: Each message includes content, timestamp, and sender information.
- Filter Messages: Messages can be filtered by sender or recipient.
User
: Represents a user in the system.Message
: Stores message content, time, and author.Group
: Manages groups of users.Chat
: Manages conversations between users.System
: Handles user creation, group creation, and sending messages.
-
Create a user:
System system; system.create_user("Alice"); system.create_user("Bob");
-
Send a message:
system.send_text("Alice", "Bob", "Hello, Bob!");
-
Fetch chat:
auto chat = system.get_chat("Alice", "Bob"); for (const auto& message : chat) { std::cout << message; }