We need to extend the messaging system to support private 1-on-1 chats and implement the ability to block users, while maintaining compatibility with existing lobby and general chat functionality.
Requirements
Model Extensions
Private Messaging
Technical Details
- Use Django models and REST API for message storage and retrieval.
- The
Chat model should track participants and chat type.
- Ensure database integrity: avoid duplicate chat instances for the same user pair.
- Implement blocking logic at the model or API level.
- Maintain compatibility with current lobby/general chat features.
Testing
Definition of Done
We need to extend the messaging system to support private 1-on-1 chats and implement the ability to block users, while maintaining compatibility with existing lobby and general chat functionality.
Requirements
Model Extensions
Chatmodel to handle different types of chats:Messagemodel to reference the newChatmodel.BlockedUsermodel linking two users.blocked_usersManyToMany field on theUsermodel.Private Messaging
Technical Details
Chatmodel should track participants and chat type.Testing
ChatandMessagemodels.Definition of Done
Chatmodel created and integrated with messages.