Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stale device lists when users re-join e2e rooms #4983

Closed
richvdh opened this issue Sep 5, 2017 · 2 comments
Closed

Stale device lists when users re-join e2e rooms #4983

richvdh opened this issue Sep 5, 2017 · 2 comments

Comments

@richvdh
Copy link
Member

richvdh commented Sep 5, 2017

Yet another stale device list bug:

  • Alice and Bob share an e2e room; Bob tracks Alice's devices
  • Bob leaves the room, so stops getting updates
  • Alice adds a new device
  • Alice and Bob start sharing a room again
  • Bob has an out of date list of Alice's devices
@richvdh
Copy link
Member Author

richvdh commented Sep 5, 2017

Proposed fix is to apply two fixes to both the /sync and /keys/changes APIs:

  • Add a new field left. When Bob and Alice stop sharing any rooms, Bob's server puts Alice's user id in this field, so that the client knows it will no longer receive updates:
    GET /sync
    
    200 OK
    {
        "device_lists": {
            "changed": [ … ],
            "left": ["@alice:matrix.org", … ],
        },
        …
    }
    
  • When Alice rejoins a room that Bob is in (or vice versa), Bob's server notes that (a) Alice they now share a room and (b) they did not share a room before, and adds Alice's user to the 'changed' list.

@richvdh
Copy link
Member Author

richvdh commented Sep 18, 2017

This has been fixed for riot-web in matrix-org/matrix-js-sdk#535 and matrix-org/synapse#2443; note that it will require development versions of both synapse and riot, currently.

Fixes for Android (element-hq/riot-android#1603) and iOS (matrix-org/matrix-ios-sdk#340) remain outstanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants