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

Send device list update EDUs on room join #16875

Closed
wants to merge 4 commits into from

Conversation

kegsay
Copy link
Contributor

@kegsay kegsay commented Jan 30, 2024

Fixes #11374 Tested in matrix-org/complement#706

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Code style is correct
    (run the linters)

@kegsay kegsay requested a review from a team as a code owner January 30, 2024 16:43
@kegsay
Copy link
Contributor Author

kegsay commented Feb 2, 2024

Closing this PR because, for this to be useful, it requires MSC4081 to be included as well. Given we don't have an implementation of MSC4081 then this PR just adds more network traffic without concretely fixing anything.

Why does this PR need MSC4081? It is supposed to guard against the following failure mode:

  • Alice joins a room over federation to Bob's server.
  • Alice's server goes offline.
  • Bob wants to send a message to Alice.

In this scenario, because we do not share device list updates eagerly, Bob's server will not know which devices Alice has, so will need to fetch them. This fetching happens when Bob's client comes online and decides to try to send a message in the room. Here's the problem: to successfully send the message, Bob needs both the device list and one-time keys for each device. But Bob cannot get this because Alice's server is down. If we did MSC4081 we would instead use the fallback key which would've been eagerly sent.

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

Successfully merging this pull request may close these issues.

Synapse doesn't send out device list updates to previously unseen homeservers when joining a room
1 participant