We’re making an event based meetup type of application where users can chat amongst themselves before attending the event. When a user selects an event, we are looking to have the user automatically added to a group chat. For example, any user that wants to attend “Event A” will automatically be added to a group chat for “Event A” once they press the “Attend” button.
Right now the problem we are facing is that when the user selects the attend button it creates a separate group chat each time, rather than adding the user to an already existing group chat for the event. We’ve seen tutorials on how to create group chats, but those mainly consist of the users manually selecting who they want to chat with. Any help would be greatly appreciated!
I have a few questions though. What should the relationship be between events and messages: many to many, or one to many (Event to Messages)? And how do we go about this without creating a new message room each time someone clicks the “Attend” button? Would it be possible for you to provide an example?
I’d also like to know if it’s possible to limit the size of the group chat and split it up possibly if there are more than 10 people attending the event?
There is just one message room which = the event itself. No rooms. Just the event has messages. Same relationship like any group chat. I think an event can have many messages, a message has one event.
That’s going to be available to anyone who is in the group. If you want to split it up you might have to think about having a separate group chat collection like you were thinking already.