I want someone to be able to click a button and be taken to a random chat room with <= 1 other people in it. So, the logic is: press button → check to see if there’ s a chat room with 1 person in it → if not then create new chat room → join chat room.
So far, I’m doing this:
As soon as they press the button, I add a chat user (the person) to a chat. I only add them though when the chat user count of that chat is <= 1. I don’t think this is right. Could somebody be very specific in what I should do? Should I make changes to a chat only if there’s <= 1 people? If so, how do I essentially make this into an if else statement so that IF there’s no chat with 1 person in it, ELSE (basically THEN) create a new chat.
Also let me know if you could do a 1 on 1. I’ve got a few other questions as well. Thank you!