Skip to content

Event handlers for state events are sometimes called twice #5785

@gingershaped

Description

@gingershaped

While developing a bot using the matrix-rust-sdk, I have observed that event handlers for state events (in my case OriginalRoomMemberEvent) are occasionally called twice when a state event arrives. Client::handle_sync_timeline_events always calls the handler, but sometimes Client::handle_sync_state_events also calls it. This behavior makes it difficult to write a bot that needs to respond to state events, unless the event handlers can be made idempotent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions