I’m building random chat app. When somebody presses a certain button, they are taken to a chat room where I want them to join another person who pressed the same button. It’s like Omegle, except for chat rooms.
Here’s what it looks like from a database standpoint:
I’ve got chat data…
And I’ve also got message data…
I didn’t think I’d need anything more since I’m not saving any data. Once somebody leaves the chat room, it’s over.
Right now I’m encountering a problem workflow wise. I have this for when a person presses the button to join a chat room:
After pressing the button, workflow step 1 is…
Workflow step 2 is…
What would be the next step? So far we’ve created a new chat and we’ve navigated them to the chat room page (a page with a chat box). How do I ensure they’ve found a room with a random person who also clicked the button? Also, when one person leaves, how do I ensure both parties are sent back to the home screen?
Thank you for your help, I’m open to any 1 on 1’s as well.