Skip to content

Should methods like MatrixClient.getRooms() throw a warning/error if client was not started? #904

@cedricvanrompay

Description

@cedricvanrompay

I lost quite some time with a bug that was caused by me calling MatrixClient.createRoom then MatrixClient.getRooms without having called MatrixClient.startClient (as a result the client was not syncing and not updating its room list, even though the call to createRoom did return successfully with a room Id).

I think that, unless there are some use cases where it makes sense to call MatrixClient.getRooms on a client that has not been started yet, the method should probably throw an error or a warning if the client was not started.

This would apply to every method that requires the client to be synchronizing.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions