Describe the task that needs to be done.
Currently, a user can only send chat messages to one user at a time. This makes any sort of group coordination is very difficult. Students being able to create chat groups would mean that students can more easily organise things like class events and study groups.
Group chat functionality includes (potentially split between related tickets):
Creating a new group chat
Chatting in a group gives all normal chat functionality
Adding people to a new/existing group chat
Ability to leave a chat
Describe how a solution to your proposed task might look like (and any alternatives considered).
Any implementation will touch many areas of the codebase. Messages are currently only expected to occur between two users and they are strictly entered into the database as such. For example, getting the last message method currently expects a buddyID.
Option 1 (Hacky, breaks lots of rules)
Group chats could be represented by fake/"headless" buddies that have special behaviour, which would hopefully maintain more consistency between how things are currently handled and the introduction of groups. (e.g. a message to the group chat, would actually be a message to the buddy and then somehow every chat participant can pull all messages from the group chat.)
Option 2 (Alot more work but could be better in the long run and more secure)
Create a new data model along side the current user sends messages structure to something where messages belong to groups and a user subscribes/belongs to a group. This means groups would be extendible and be able to have their own metadata. Care would need to be taken to make sure that different areas of the code would still behave as expected (e.g. the code that gets the chats to display currently iterates through buddyIDs). On a whole this approach would pretty much mean developing another chat system and then integrating it at the common points.
Notes
This issue might need to be broken down into some sort of mega/epic set of related tasks.
Describe the task that needs to be done. Currently, a user can only send chat messages to one user at a time. This makes any sort of group coordination is very difficult. Students being able to create chat groups would mean that students can more easily organise things like class events and study groups.
Group chat functionality includes (potentially split between related tickets):
Describe how a solution to your proposed task might look like (and any alternatives considered). Any implementation will touch many areas of the codebase. Messages are currently only expected to occur between two users and they are strictly entered into the database as such. For example, getting the last message method currently expects a buddyID.
Option 1 (Hacky, breaks lots of rules) Group chats could be represented by fake/"headless" buddies that have special behaviour, which would hopefully maintain more consistency between how things are currently handled and the introduction of groups. (e.g. a message to the group chat, would actually be a message to the buddy and then somehow every chat participant can pull all messages from the group chat.)
Option 2 (Alot more work but could be better in the long run and more secure) Create a new data model along side the current user sends messages structure to something where messages belong to groups and a user subscribes/belongs to a group. This means groups would be extendible and be able to have their own metadata. Care would need to be taken to make sure that different areas of the code would still behave as expected (e.g. the code that gets the chats to display currently iterates through buddyIDs). On a whole this approach would pretty much mean developing another chat system and then integrating it at the common points.
Notes This issue might need to be broken down into some sort of mega/epic set of related tasks.