flutter_firebase_chat_core
flutter_firebase_chat_core copied to clipboard
Only call createRoom when user sends message?
trafficstars
Hey,
In the example, I noticed createRoom is called when the user taps on another one at https://github.com/flyerhq/flutter_firebase_chat_core/blob/main/example/lib/users.dart
I use this logic in my app, and noticed Firestore is littered with empty rooms as the user just looks at the chat page and then leaves.
Would it be easy to move this logic on chat send call? Eg user sends chat and check is made if room exists already, and add the message there, otherwise create room?