Skip to content

Only call createRoom when user sends message? #104

@giorgio79

Description

@giorgio79

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions