-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Description
Currently, our real-time chat works with WebSockets but does not store messages. This feature will allow users to optionally save their chat history. Users should be able to enable or disable chat storage based on their preference.
Implementation Steps
UI Update:
Add a toggle switch (or checkbox) in the chat interface:
✅ Save Chat History (default: off)
Backend Update:
Modify the mesage event to check if the user has enabled chat storage.
If enabled, store the message in a database (MongoDB).
Provide an API or WebSocket event to fetch stored messages when a user joins a chat.
Security & Cleanup:
Ensure users can only access their stored messages.
Consider adding a chat retention policy to delete old messages if needed.
Expected Outcome
Users can choose whether their messages are saved, improving privacy and flexibility in chat history management.
Contributions Welcome! 🚀