Skip to content

Indexed DB can have inconsistency in membership event content #4198

Open
@AndrewFerr

Description

@AndrewFerr

It's possible for the sync store to have incorrect content of a m.room.member event in roomsData.join.$roomID.state[*], but correct content for that same event in roomsData.join.$roomID.timeline[*].

To reproduce:

  • Visit develop.element.io in two tabs, each tab signed in with a different user
  • Create/visit a room that has both users in it
  • Have one user leave the room
  • With the user that remains in the room:
    • Open Element devtools and view Explore room state > m.room.member > MXID of user who left
    • Open browser devtools and view Indexed DB for https://develop.element.io > matrix-js-sdk:riot-web-sync > sync
  • See that Element devtools shows the correct value of content.membership = "leave"
  • See that the Indexed DB has the same value for content.membership in the timeline event for the same eventID
  • See that the Indexed DB has an *incorrect value of content.membership = "join" in the state event for the same eventID

With that said, any client that uses timeline to load state won't have any problems (and I assume Element Web does that, as it has accurate member lists in rooms). But if a client were read from state, it would get incorrect data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions