flutter_firebase_chat_core icon indicating copy to clipboard operation
flutter_firebase_chat_core copied to clipboard

Only call createRoom when user sends message?

Open giorgio79 opened this issue 2 years ago • 3 comments
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?

giorgio79 avatar Feb 12 '23 04:02 giorgio79