Open freekvandeven opened 2 months ago
I think this is a valid solution, and a logical one. We do not need to consider same-time chat creation so we cannot just create the chat under a random uuid. This might cause 2 chats to be created between the same people. Especially with bad internet connection and a local firebase cache, this will result in some unexpected behaviour.
You now have to create a chat before you can route to it. In wellqom and other projects this can cause for a lot of empty chats which the user can delete themselves but it doesn't look nice. In the case of personal chats (and maybe groupchats as well) you should be able to go to that screen without the chat existing in the database yet. Once you type the first message the chat will be created. Maybe it would also be nice to either have a button to just create the groupchat without having to type a message or have a clear text indicating you need to type something for the chat to stay.