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.